Skip to content

Home

Development

IDEs

API Explorer

Releases

Release notes

Martini Runtime

Martini Desktop

Martini Online

Feature requests

Bug reports

MonitorMethods

The MonitorMethods class contains one-liners for managing monitor rules, searching invoke documents, and getting monetization summaries. Methods from this class can be used in both Gloop or Groovy code.

deleteMonitorRule

The MonitorMethods.deleteMonitorRule(String) method is used to delete a monitor rule.

Parameters

Property Type Description
name java.lang.String Name of the rule to delete

Usage

Sample Gloop service showing how to use the `deleteMonitorRule(String)` one-liner of `MonitorMethods`

saveMonitorRule

The MonitorMethods.saveMonitorRule(MonitorRuleMetadata) method is used to save a monitor rule.

Parameters

Property Type Description
rule io.toro.martini.monitor.MonitorRuleMetadata Monitor rule to save

Usage

Sample Gloop service showing how to use the `saveMonitorRule(io.toro.martini.monitor.MonitorRuleMetadata)` one-liner of `MonitorMethods`

disableMonitorRule

The MonitorMethods.disableMonitorRule(String) method is used to disable a monitor rule.

Parameters

Property Type Description
name java.lang.String Name of the rule to disable

Usage

Sample Gloop service showing how to use the `disableMonitorRule(String)` one-liner of `MonitorMethods`

enableMonitorRule

The MonitorMethods.enableMonitorRule(String) method is used to enable a monitor rule.

Parameters

Property Type Description
name java.lang.String Name of the rule to enable

Usage

Sample Gloop service showing how to use the `enableMonitorRule(String)` one-liner of `MonitorMethods`

getMonitorRules

The MonitorMethods.getMonitorRules(...) method is used to get a list of monitor rules. There are two variations of this method that can be used:

  • MartiniMethods.getMonitorRules()
  • MartiniMethods.getMonitorRules(boolean)
  • MartiniMethods.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

Sample Gloop service showing how to use the `getMonitorRules()` one-liner of `MonitorMethods`

getMonitorRule

The MonitorMethods.getMonitorRule(String) method 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

Sample Gloop service showing how to use the `getMonitorRule(String)` one-liner of `MonitorMethods`

getMonetizationBill

The MonitorMethods.getMonetizationBill(InvokeDocumentQuery) method 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

Sample Gloop service showing how to use the `getMonetizationBill(InvokeDocumentQuery)` one-liner of `MonitorMethods`

searchMonitor

The MonitorMethods.searchMonitor(...) method 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

Sample Gloop service showing how to use the `searchMonitor(...)` one-liner of `MonitorMethods`