Latest Metric results
API calls for retrieving latest metric results
Name | Description | Shortcut |
---|---|---|
GET: List all latest metric data | List latest metric data . | Description |
GET: List latest metric data for Group | List latest metric data for a specific endpoint group. | Description |
[GET]: List all latest metric data
This method may be used to retrieve latest metric data available in a report. User can filer the results by status and limit the amount of results returned
Input
List All latest metric data
/latest/{report}/{group_type}?[date]&[filter]&[limit]&[strict]
Path Parameters
Type | Description | Required | Default value |
---|---|---|---|
report | name of the report used | YES | |
group_type | type of endpoint group | YES | |
group_name | name of endpoint group | YES |
Url Parameters
Type | Description | Required | Default value |
---|---|---|---|
date | target a specific data | NO | today's date |
filter | filter by status values (all ,non-ok ,ok ,critical ,warning ,unknown ,missing ) | NO | all |
limit | limit number of results returned | NO | 500 |
strict | strict mode on/off | NO | "false" |
Notes:
group_type
in the specific request refer always to endpoint groups (e.g.. SITES
).
strict
when strict mode is ON, the response will contain only the latest grouped by endpoint_group/host/service/metric.
Headers
x-api-key: secret_key_value
Accept: application/json or application/xml
Response Code
Status: 200 OK
Response body
{
"status": {
"message": "type of message received",
"code": "return code"
},
"data": {
"metric_data": [
{
"endpoint_group": "name of endpoint group",
"service": "name of service",
"endpoint": "name of endpoint",
"metric": "name of metric",
"timestamp": "2018-06-22T11:55:44Z",
"status": "OK || WARNING || CRITICAL || MISSING || UNKNOWN",
"summary": "summary of the metric message - generated by the monitoring engine (nagios)",
"message": "body of nagios generated message"
}
]
}
}
Example Request:
URL:
latest/Report_B/TENANT_SITES?date=2015-05-01T00:00:00Z&filter=non-ok&limit=10
Headers:
x-api-key: secret_key_value
Accept: application/json or application/xml
Example Response:
Code:
Status: 200 OK
Response body:
{
"status": {
"message": "application/json",
"code": "200"
},
"data": {
"metric_data": [
{
"endpoint_group": "EL-01-AUTH",
"service": "someService",
"endpoint": "someservice.example.gr",
"metric": "someService-FileTransfer",
"timestamp": "2015-05-01T05:00:00Z",
"status": "WARNING",
"summary": "someService status is ok",
"message": "someService data upload test return value of ok"
},
{
"endpoint_group": "EL-02-AUTH",
"service": "someService",
"endpoint": "someservice.example.gr",
"metric": "someService-FileTransfer",
"timestamp": "2015-05-01T05:00:00Z",
"status": "MISSING",
"summary": "someService status is ok",
"message": "someService data upload test return value of ok"
},
{
"endpoint_group": "EL-03-AUTH",
"service": "someService",
"endpoint": "someservice.example.gr",
"metric": "someService-FileTransfer",
"timestamp": "2015-05-01T05:00:00Z",
"status": "CRITICAL",
"summary": "someService status is ok",
"message": "someService data upload test return value of ok"
},
{
"endpoint_group": "EL-01-AUTH",
"service": "someService",
"endpoint": "someservice.example.gr",
"metric": "someService-FileTransfer",
"timestamp": "2015-05-01T01:00:00Z",
"status": "UNKNOWN",
"summary": "someService status is CRITICAL",
"message": "someService data upload test failed"
}
]
}
}
[GET]: List All Metric Data for a specific endpoint group
This method may be used to retrieve latest metric data available in a report for a specific endpoint group. User can filer the results by status and limit the amount of results returned
Input
/latest/{report}/{group_type}/{group_name}/?[date]&[filter]&[limit]
Path Parameters
Type | Description | Required | Default value |
---|---|---|---|
report | name of the report used | YES | |
group_type | type of endpoint group | YES | |
group_name | name of endpoint group | YES |
Url Parameters
Type | Description | Required | Default value |
---|---|---|---|
date | target a specific data | NO | today's date |
filter | filter by status values (all ,non-ok ,ok ,critical ,warning ,unknown ,missing ) | NO | all |
limit | limit number of results returned | NO | 500 |
strict | strict mode on/off | NO | "false" |
Notes:
group_type
and group_name
in the specific request refer always to endpoint groups (e.g.. SITES
).
strict
when strict mode is ON, the response will contain only the latest grouped by endpoint_group/host/service/metric.
Headers
x-api-key: shared_key_value
Accept: application/json or application/xml
Response Code
Status: 200 OK
Response body
{
"status": {
"message": "type of message received",
"code": "return code"
},
"data": {
"metric_data": [
{
"endpoint_group": "name of endpoint group",
"service": "name of service",
"endpoint": "name of endpoint",
"metric": "name of metric",
"timestamp": "2018-06-22T11:55:44Z",
"status": "OK || WARNING || CRITICAL || MISSING || UNKNOWN",
"summary": "summary of the metric message - generated by the monitoring engine (nagios)",
"message": "body of nagios generated message"
},
]
}
}
Example Request:
URL:
latest/Report_B/TENANT_SITES/EL-01-AUTH?date=2015-05-01T00:00:00Z&filter=non-ok&limit=10
Headers:
x-api-key: secret_key_value
Accept: application/json or application/xml
Example Response:
Code:
Status: 200 OK
Response body:
{
"status": {
"message": "application/json",
"code": "200"
},
"data": {
"metric_data": [
{
"endpoint_group": "EL-01-AUTH",
"service": "someService",
"endpoint": "someservice.example.gr",
"metric": "someService-FileTransfer",
"timestamp": "2015-05-01T05:00:00Z",
"status": "WARNING",
"summary": "someService status is warning",
"message": "someService data upload test return value of warning"
},
{
"endpoint_group": "EL-01-AUTH",
"service": "someService",
"endpoint": "someservice.example.gr",
"metric": "someService-FileTransfer",
"timestamp": "2015-05-01T01:00:00Z",
"status": "UNKNOWN",
"summary": "someService status is CRITICAL",
"message": "someService data upload test failed"
}
]
}
}