Skip to main content

Latest Metric results

API calls for retrieving latest metric results

NameDescriptionShortcut
GET: List all latest metric dataList latest metric data .Description
GET: List latest metric data for GroupList 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

TypeDescriptionRequiredDefault value
reportname of the report usedYES
group_typetype of endpoint groupYES
group_namename of endpoint groupYES

Url Parameters

TypeDescriptionRequiredDefault value
datetarget a specific dataNOtoday's date
filterfilter by status values (all,non-ok,ok,critical,warning,unknown,missing)NOall
limitlimit number of results returnedNO500
strictstrict mode on/offNO"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

TypeDescriptionRequiredDefault value
reportname of the report usedYES
group_typetype of endpoint groupYES
group_namename of endpoint groupYES

Url Parameters

TypeDescriptionRequiredDefault value
datetarget a specific dataNOtoday's date
filterfilter by status values (all,non-ok,ok,critical,warning,unknown,missing)NOall
limitlimit number of results returnedNO500
strictstrict mode on/offNO"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"
}
]
}
}