public final class MonitorMethods extends Object
| Constructor and Description |
|---|
MonitorMethods(io.toro.martini.rengine.RuleService<io.toro.martini.monitor.MonitorRuleMetadata> monitorRuleService,
io.toro.martini.monitor.MonitorService monitorService,
io.toro.martini.monitor.MonitorSearchService monitorSearchService) |
| Modifier and Type | Method and Description |
|---|---|
static void |
deleteMonitorRule(String name)
Delete the monitor rule matching the provided name.
|
static void |
disableMonitorRule(String name)
Disable the monitor rule matching the provided name.
|
static void |
enableMonitorRule(String name)
Enable the monitor rule matching the provided name.
|
static GloopModel |
getMonetizationBill(GloopModel query)
Compute and return the costs incurred by a specific set of invocations, selected through a query.
|
static GloopModel |
getMonitorRule(String name)
Get the monitor rule matching the provided name.
|
static GloopModel |
getMonitorRules()
Get all existing monitor rules in the instance.
|
static GloopModel |
getMonitorRules(boolean enabled)
Get all existing monitor rules in the instance.
|
static GloopModel |
getMonitorRules(int page,
int size,
Boolean enabled)
Get all monitors matching the provided filter.
|
static void |
saveMonitorRule(GloopModel rule)
Save the provided monitor rule
|
static GloopModel |
searchMonitor(String query,
String[] id,
String[] trackerId,
String[] packageName,
String[] serviceName,
String[] user,
String[] userGroups,
String[] endpointName,
String[] endpointType,
String[] url,
String[] remoteAddress,
String[] country,
String[] location,
Boolean success,
Long fromResponseTime,
Long toResponseTime,
Date fromDate,
Date toDate,
Double minCost,
Double maxCost,
int pageSize,
int page)
Search for invoke documents matching the provided Solr query and filters.
|
@Autowired MonitorMethods(io.toro.martini.rengine.RuleService<io.toro.martini.monitor.MonitorRuleMetadata> monitorRuleService, @Qualifier(value="databaseMonitorService") io.toro.martini.monitor.MonitorService monitorService, io.toro.martini.monitor.MonitorSearchService monitorSearchService)
@GloopObjectParameter(value="monitorRuleMetadata{\nmonitorRuleMetadata#io.toro.martini.monitor.MonitorRuleMetadata{\n}\n}") public static GloopModel getMonitorRule(@GloopParameter(allowNull=false) String name)
name - the name of the monitor rule@GloopObjectParameter(value="monitorRulesMetadata{\nmonitorRulesMetadata#io.toro.martini.monitor.MonitorRuleMetadata[]{\n}\n}") public static GloopModel getMonitorRules()
@GloopObjectParameter(value="monitorRulesMetadata{\nmonitorRulesMetadata#io.toro.martini.monitor.MonitorRuleMetadata[]{\n}\n}") public static GloopModel getMonitorRules(boolean enabled)
enabled - if true, then this method will only return enabled monitor rules;
if false, only disabled monitor rules@GloopObjectParameter(value="monitorRulesMetadata{\nmonitorRulesMetadata#io.toro.martini.monitor.MonitorRuleMetadata[]{\n}\n}") public static GloopModel getMonitorRules(@GloopParameter(defaultValue="1") int page, @GloopParameter(defaultValue="25") int size, Boolean enabled)
page - the starting pagesize - the maximum number of monitor rules per pageenabled - if true, then this method will only return enabled monitor rules;
if false, only disabled monitor rules;
if null, returns all monitor rules, regardless if enabled or disabledpublic static void enableMonitorRule(@GloopParameter(allowNull=false) String name)
name - the name of the monitor rulepublic static void disableMonitorRule(@GloopParameter(allowNull=false) String name)
name - the name of the monitor rulepublic static void saveMonitorRule(@GloopObjectParameter(value="MonitorRuleMetadata#io.toro.martini.monitor.MonitorRuleMetadata{\n}") @GloopParameter(allowNull=false) GloopModel rule)
rule - the monitor rulepublic static void deleteMonitorRule(@GloopParameter(allowNull=false) String name)
name - the name of the monitor rule@GloopObjectParameter(value="monetizationBill{\nmonetizationBill#io.toro.martini.monitor.MonetizationBill{\n}\n}") public static GloopModel getMonetizationBill(@GloopObjectParameter(value="invokeDocumentQuery#io.toro.martini.monitor.InvokeDocumentQuery{\n}") @GloopParameter(allowNull=false) GloopModel query)
query - filter for the set of invoke documents to monetize@GloopObjectParameter(value="output{\nsearchResult#io.toro.martini.monitor.SearchResult{\n}\n}") public static GloopModel searchMonitor(@GloopParameter(defaultValue="*:*",allowNull=false) String query, String[] id, String[] trackerId, String[] packageName, String[] serviceName, String[] user, String[] userGroups, String[] endpointName, String[] endpointType, String[] url, String[] remoteAddress, String[] country, String[] location, Boolean success, Long fromResponseTime, Long toResponseTime, Date fromDate, Date toDate, Double minCost, Double maxCost, @GloopParameter(defaultValue="10",allowNull=false) int pageSize, @GloopParameter(defaultValue="1",allowNull=false) int page)
Search for invoke documents matching the provided Solr query and filters.
The query parameter is a "scoring" query;
it determines if a document matches, and how well the document matches.
The other parameters in this one-liner are added as "non-scoring" filter queries to the base query;
they only determine if a document matches.
Thus, to appear in the returned search result,
a document must satisfy query and other filters
like id, trackerId, packageName, etc. (if any).
Order of relevance amongst results shall be based on how well a document matches query.
query - Solr query to executeid - acceptable values for the id propertytrackerId - acceptable values for the trackerId propertypackageName - acceptable values for the packageName propertyserviceName - acceptable values for the serviceName propertyuser - acceptable values for the user propertyuserGroups - acceptable values for the userGroups propertyendpointName - acceptable values for the endpointName propertyendpointType - acceptable values for the endpointType propertyurl - acceptable values for the url propertyremoteAddress - acceptable values for the remoteAddress propertycountry - acceptable values for the country propertylocation - acceptable values for the location propertysuccess - required value for the success propertyfromResponseTime - display documents containing response time from this value;
represented in millisecondstoResponseTime - display documents containing a response time until this value;
represented in millisecondsfromDate - display documents containing timestamp from this datetoDate - display documents containing timestamps until this dateminCost - acceptable values for the minCost propertymaxCost - acceptable values for the maxCost propertypageSize - number of results to display in a pagepage - page number of results to displayCopyright © 2021. All rights reserved.