MonitorFunctions
The Monitor
class contains functions for managing monitor rules,
searching invoke documents, and getting monetization summaries.
Functions from this class can be used in both Gloop or Groovy code.
deleteMonitorRule
The Monitor.deleteMonitorRule(String)
function is used to delete a monitor rule.
Parameters
Property |
Type |
Description |
name |
java.lang.String |
Name of the rule to delete |
Usage

saveMonitorRule
The Monitor.saveMonitorRule(MonitorRuleMetadata)
function is used to save a monitor rule.
Parameters
Property |
Type |
Description |
rule |
io.toro.martini.monitor.MonitorRuleMetadata |
Monitor rule to save |
Usage

disableMonitorRule
The Monitor.disableMonitorRule(String)
function is used to disable a monitor rule.
Parameters
Property |
Type |
Description |
name |
java.lang.String |
Name of the rule to disable |
Usage

enableMonitorRule
The Monitor.enableMonitorRule(String)
function is used to enable a monitor rule.
Parameters
Property |
Type |
Description |
name |
java.lang.String |
Name of the rule to enable |
Usage

getMonitorRules
The Monitor.getMonitorRules(...)
function is used to get a list of monitor rules.
There are two variations of this function that can be used:
MartiniFunctions.getMonitorRules()
MartiniFunctions.getMonitorRules(boolean)
MartiniFunctions.getMonitorRules(int, int, boolean)
Parameters
Property |
Type |
Description |
page |
java.lang.Integer |
Page number in pagination |
size |
java.lang.Integer |
The maximum number of monitor rules to return |
enabled |
java.lang.Boolean |
If true , only monitor rules that are enabled will be returned |
Return value
Property |
Type |
Description |
monitorRulesMetadata |
io.toro.martini.monitor.MonitorRuleMetadata[] |
Array of existing monitor rules |
Usage

getMonitorRule
The Monitor.getMonitorRule(String)
function is used to get a monitor rule.
Parameters
Property |
Type |
Description |
name |
java.lang.String |
The name of the monitor rule to get |
Return value
Property |
Type |
Description |
monitorRuleMetadata |
io.toro.martini.monitor.MonitorRuleMetadata |
The retrieved monitor rule |
Usage

getMonetizationBill
The Monitor.getMonetizationBill(InvokeDocumentQuery)
function is used to get a bill summary
based on a provided query.
Parameters
Property |
Type |
Description |
query |
io.toro.martini.monitor.InvokeDocumentQuery |
Query selecting the documents to calculate the cost of |
Return value
Property |
Type |
Description |
monetizationBill |
io.toro.martini.monitor.MonetizationBill |
The summarized bill that matches the query |
Usage

searchMonitor
The Monitor.searchMonitor(...)
function is used to get a monitor rule.
Parameters
Property |
Type |
Description |
query |
java.lang.String |
Solr query to be performed |
id |
java.lang.String |
ID of the document to retrieve |
trackerId |
java.lang.String[] |
Tracker ID of the document(s) to find |
packageName |
java.lang.String[] |
Package name of the document(s) to find |
serviceName |
java.lang.String[] |
Service name of the document(s) to find |
user |
java.lang.String[] |
User of the document(s) to find |
userGroups |
java.lang.String[] |
User groups of the document(s) to find |
endpointName |
java.lang.String[] |
Endpoint name of the document(s) to find |
endpointType |
java.lang.String[] |
Endpoint type of the document(s) to find |
url |
java.lang.String[] |
URL of the document(s) to find |
remoteAddress |
java.lang.String[] |
Remote address of the document(s) to find |
country |
java.lang.String[] |
Country of the document(s) to find |
location |
java.lang.String[] |
Location of the document(s) to find |
success |
java.lang.Boolean |
Boolean value indicating whether the documents' corresponding operation has been successful |
fromResponseTime |
java.lang.Long |
Display document(s) containing response time from (minimum) this long value. The long value is represented in millisecond. |
toResponseTime |
java.lang.Long |
Display document(s) containing response time to (maximum) this long value. The long value is represented in millisecond. |
fromDate |
java.util.Date |
Display document(s) containing a timestamp from this date |
toDate |
java.util.Date |
Display document(s) containing a timestamp to this date |
minCost |
java.lang.Double |
Minimum cost of document(s) to find |
maxCost |
java.lang.Double |
Maximum cost of document(s) to find |
pageSize |
java.lang.Integer |
Number of results to display in a page |
page |
java.lang.Integer |
Page number of results to display |
Return value
Property |
Type |
Description |
searchResult |
io.toro.martini.monitor.SearchResult |
Results derived from the query |
Usage
