Skip to content

Overview

Concepts and Principles

Development

Overview

IDEs

API Explorer

Releases

Release Notes

TORO Integrate

Coder Studio

Coder Cloud

Bug Reports

Search

Monitor Rules

A Monitor Rule allows you to specify which requests should be throttled and/or monetized and how TORO Integrate will throttle and/or monetize these requests. Monetization allows you to compute your API usage costs whilst throttling allows you to limit the amount of requests the server will process. Monitor Rules dictate how the Monitor Search Index will be be queried when throttling and/or monetizing requests.

Properties

A Monitor Rule is defined using the following fields:

Name Required Default Value Description
Name true "New Rule" The Monitor Rule's identifier.
Description true "New Rule" Describes what the Monitor Rule does.
Enabled false false Indicates if the rule is active or inactive; an inactive rule means TORO Integrate won't check matches for it.
Priority true 0 Influences the order by which TORO Integrate checks matches for rules; a lower number indicates higher priority. A request may only match one rule.
Invokes Per Minute false -1 The maximum number of invokes available per minute. A negative number indicates an unlimited number of invocations.
Invokes Per Hour false -1 The maximum number of invokes available per hour. A negative number indicates an unlimited number of invocations.
Invokes Per Day false -1 The maximum number of invokes available per day. A negative number indicates an unlimited number of invocations.
Invokes Per Week false -1 The maximum number of invokes available per week. A negative number indicates an unlimited number of invocations.
Invokes Per Month false -1 The maximum number of invokes available per month. A negative number indicates an unlimited number of invocations.
Service false The service to be executed when a rule is matched.
Cost false The numeric cost of a matched request. Although possible, this doesn't have to be a monetary value. This can be any number used to compute usage.
Date Type true Rolling Possible values are Rolling and Calendar.
Users true Everyone Requires the request to be made by certain users only to match to a rule. You have the option to apply the rule to all users (Everyone), to certain Integrate Users only (excluding ECC users), or only to anonymous users only (those not logged in).
Packages false Limits requests to those that invoke services from the packages listed in this field. An empty field means all packages will be checked.
URL Patterns false Specifies the URL patterns in Ant Path Notation which requests must match in order to match the particular rule. If none has been set, the Monitor Rule will be checked against all URLs.
Services false Specifies the services to be matched by the rule. If this field is left blank, all services will be matched.

Date Types

Rules have two possible date types: rolling or calendar.

  • A Rolling date type means TORO Integrate will subtract a minute/hour/day/week/month from the current request time and then count the number of requests from that point to present to see how many times a service has already been invoked. When checking for invokes per minute, a minute will be subtracted from the current time; invokes per hour, an hour will be subtracted; and so on. In other words, this type will check the number of invokes in the past minute/hour/day/week/month.
  • A Calendar date type means TORO Integrate count the number of requests from the starting minute/hour/day/week/month to the present time based on the Gregorian Calendar.

Below are tables showing the expected start times when counting service invokes:

  • If the request was received on Saturday, 04/07/2015 05:43:42 (dd/MM/yyyy' 'HH:mm:ss)1, assuming that the first day of the week is Sunday:

    Rolling Calendar
    Starting Minute 04/07/2015 05:42:42 04/07/2015 05:43:00
    Starting Hour 04/07/2015 04:43:42 04/07/2015 05:00:00
    Starting Day 03/07/2015 05:43:42 04/07/2015 00:00:00
    Starting Week 27/06/2015 05:43:42 28/06/2015 00:00:00
    Starting Month 04/06/2015 05:43:42 01/07/2015 00:00:00
  • If the request was received on Thursday, 16/04/2015 22:45:49 (dd/MM/yyyy' 'HH:mm:ss), assuming that the first day of the week is Sunday:

    Rolling Calendar
    Starting Minute 16/04/2015 22:44:49 16/04/2015 22:45:00
    Starting Hour 16/04/2015 21:45:49 16/04/2015 22:00:00
    Starting Day 15/04/2015 22:45:49 16/04/2015 00:00:00
    Starting Week 09/04/2015 22:45:49 12/04/2015 00:00:00
    Starting Month 16/03/2015 22:45:49 01/04/2015 00:00:00

UI

To manage an instance's rules, open the Throttling & Monetization dialog. To open the dialog, right click on the target instance and then click on Throttling and Monetization from the context menu.

Accessing the *Throttling and Monetization* dialog

To manage an instance's rules you can either:

  • Click on the Throttling and Monetization icon on the left-hand side; or
  • Right click on a blank part of the Coder Navigator, then choose Throttling and Monetization from the context menu.

Accessing the *Throttling and Monetization* space

Creating a Monitor Rule

To create a new Monitor Rule, open the Throttling & Monetization dialog or space and then:

  1. In the interface that pops up, click on the add button.
  2. Fill up the form.
  3. Click Save.

Creating a Monitor Rule

Creating a Monitor Rule

Updating a Monitor Rule

To update a Monitor Rule in Coder Studio, simply select its entry from the list of existing Monitor Rules, edit the Monitor Rule's data in the form that appears on the side, and then click Save. In Coder Cloud, the same steps apply except to access the form, you have to click the edit button in the Monitor Rule's entry.

Removing a Monitor Rule

To remove a Monitor Rule in Coder Studio, simply select its entry from the list of existing Monitor Rules, click on the delete button, and then confirm your action. In Coder Cloud, you'll have to click on the Monitor Rule entry's delete button to show the prompt.

REST API

TORO Integrate also provides REST endpoints for maintaining Monitor Rules. This API allows you to remotely do things such as:

  • Search for rules
  • Add or remove rules
  • Enable or disable rules

  1. See patterns in SimpleDateFormat