Monitoring configuration can be done via Rest-Api calls. Basic Authorisation is used.
Metric definition
parameter | description |
---|---|
name | name of the metric |
type | count, license, value |
interval | Optional interval in seconds in which the metric is validated. Defaults to global value. |
Sample metric:
1
2
3
4
5
6
7
{
"name" : "People",
"type" : "count",
"form" : "CTM:People",
"query": "'Profile Status'=\"Enabled\"",
"interval" : 5
}
Metric types
Two types of metrics types are available:
- count
- license
- value
count
Executes a query against an AR System and validates the resultlist of the query.
license
Executes a query against an AR System Form “AR System Current License Usage” and sums the values per user. Valid queries are “floating” or “fixed”.
For license metrics to work you need to have license tracking enabled.
AR System Administration Console -> Server Information -> Configuration -> License Tracking
value
Executes a query against an AR System and returns the value of a field. Only Integer and Float Values can be used. If the query returns more than one record, the first record will be used.
The configuration option field is required for this metric.
Sample metric:
1
2
3
4
5
6
7
8
{
"name" : "People",
"type" : "value",
"form" : "CTM:People",
"query": "'Remedy Login ID'=\"Allen\"",
"field": "Corporate ID"
"interval" : 5
}
Get all metrics
Operation: Get
Url: https://your.armonitor.url/metrics
Response:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
[
{
"name": "SocialBridge",
"type": "count",
"form": "SHR:SHRCAI_SocialBridge",
"query": "'Status' < \"Completed\" AND 'Modified Date' < ($TIMESTAMP$ - 300)",
"interval": 30
},
{
"name": "AI_ApprovalComments",
"type": "count",
"form": "UDM:JobLog",
"query": "'Job Name' = \"Approval Comment\" AND 'Create Date' > ($TIMESTAMP$ - 1800)",
"interval": 30
}
]
Get a single metric
Operation: Get
Url: https://your.armonitor.url/metrics/SocialBridge
Response:
1
2
3
4
5
6
7
{
"name": "SocialBridge",
"type": "count",
"form": "SHR:SHRCAI_SocialBridge",
"query": "'Status' < \"Completed\" AND 'Modified Date' < ($TIMESTAMP$ - 300)",
"interval": 30
}
Add a new metric
Operation: Post
Url: https://your.armonitor.url/metrics
Request:
1
2
3
4
5
6
7
{
"name": "SocialBridge",
"type": "count",
"form": "SHR:SHRCAI_SocialBridge",
"query": "'Status' < \"Completed\" AND 'Modified Date' < ($TIMESTAMP$ - 300)",
"interval": 30
}
Response:
1
2
3
4
5
6
7
8
9
10
{
"status": "success",
"data": {
"name": "SocialBridge",
"type": "count",
"form": "SHR:SHRCAI_SocialBridge",
"query": "'Status' < \"Completed\" AND 'Modified Date' < ($TIMESTAMP$ - 300)",
"interval": 30
}
}
Change an existing metric
Operation: Put
Url: https://your.armonitor.url/metrics/SocialBridge
Request:
1
2
3
4
5
6
7
{
"name": "SocialBridge",
"type": "count",
"form": "SHR:SHRCAI_SocialBridge",
"query": "'Status' < \"Completed\" AND 'Modified Date' < ($TIMESTAMP$ - 900)",
"interval": 90
}
Response:
1
2
3
4
5
6
7
8
9
10
{
"status": "success",
"data": {
"name": "SocialBridge",
"type": "count",
"form": "SHR:SHRCAI_SocialBridge",
"query": "'Status' < \"Completed\" AND 'Modified Date' < ($TIMESTAMP$ - 900)",
"interval": 90
}
}
Delete a metric
Operation: Delete
Url: https://your.armonitor.url/metrics/SocialBridge