Show endpoint level statistics by using REST Monitoring APIs
Purpose
Reports endpoint level monitoring data based on predefined queries.URI
Use the Eclipse Amlen REST API GET method with the following Eclipse Amlen monitoring URI:
http://<admin-endpoint-IP:Port>/ima/v1/monitor/Endpoint
Object configuration data
Provide endpoint object configuration data in the payload of the GET method by using the following schema. Content-type is set to application/json:
curl -X GET http://127.0.0.1:9089/ima/v1/monitor/Endpoint?Name=EndpointName%26SubType=SubType%26Duration=Duration%26Monitoring-DataType=Monitoring-DataType
Where:- Name
- Specifies the name of the endpoint to return statistics about.
- SubType
- Specifies the monitoring data to report.
- Duration
- Specifies the time span, in seconds, of the data to be reported.
- Monitoring-DataType
- Specifies the type of data to order the results by.
Usage NotesĀ®
- Encode special endpoints that start with the character ! with %21 when using the REST API GET method.
- The command must be capitalized as shown.
- The command must use the double quotation marks as shown.
- The statistics that are produced can be up to 60 seconds out of date.
- The following fields are returned:
-
- Name
- String
-
- IPAddr
- String
-
- Enabled
- Boolean
-
- Total
- Numeric
-
- Active
- Numeric
-
- Messages
- Numeric
-
- Bytes
- Numeric
-
- LastErrorCode
- String
-
- ConfigTime
- Date/time
-
- BadConnections
- Numeric
-
Example
The following example uses cURL to show how a GET method is used to create the most recent statistics for all endpoints:
curl -X GET http://127.0.0.1:9089/ima/v1/monitor/Endpoint?SubType=Current
The following example shows a successful example response to the GET method that was used to create the most recent statistics for all endpoints:
{
"Version":"v1",
"Endpoint": [
{
"Name":"DemoEndpoint","IPAddr":"ALL","Enabled":false,"Total":0,"Active":0,
"Messages":0,"Bytes":0,"LastErrorCode":0,
"ConfigTime":"2015-12-11T18:29:15.519Z","ResetTime":"1970-01-01T00:00:00.000Z","BadConnections":0
},
{
"Name":"DemoMqttEndpoint","IPAddr":"ALL","Enabled":false,"Total":0,"Active":0,
"Messages":0,"Bytes":0,"LastErrorCode":0,
"ConfigTime":"2015-12-11T18:29:15.519Z","ResetTime":null,"BadConnections":0
},
{
"Name":"!MQConnectivityEndpoint","IPAddr":"/var/messagesight/data/MQConnectivityEndpoint_34109b4a50a7",
"Enabled":true, "Total":0,"Active":0,"Messages":0,"Bytes":0,"LastErrorCode":0,
"ConfigTime":"2016-04-27T16:42:33.464-05:00","ResetTime":null,"BadConnections":0
}
] }
!MQConnectivityEndpoint
is displayed even if MQConnectivity is not enabled.
!MQConnectivityEndpoint
is an internal pre-configured endpoint that cannot be
changed. The following example uses cURL to show how a GET method is used to create the most recent statistics about an endpoint called DemoEndpoint:
curl -X GET http://127.0.0.1:9089/ima/v1/monitor/Endpoint?Name=DemoEndpoint%26SubType=Current
The following example shows a successful example response to the GET method that was used to create the most recent statistics about an endpoint called DemoEndpoint:
{ "Version":"v1", "Endpoint": [ {
"Name":"DemoEndpoint","IPAddr":"ALL","Enabled":false,"Total":0,"Active":0,"Messages":0,"Bytes":0,"LastErrorCode":0,
"ConfigTime":"2015-12-11T18:29:15.519Z","ResetTime":"1970-01-01T00:00:00.000Z","BadConnections":0 } ]
The following example uses cURL to show how a GET method is used to create statistics about an
internal pre-configured endpoint, !MQConnectivityEndpoint
:
curl -X GET http://127.0.0.1:9089/ima/v1/monitor/Endpoint?Name=%21MQConnectivityEndpoint
The following example shows a successful example response to the GET method that was used to
create statistics about !MQConnectivityEndpoint
:
{
"Version":"v1", "Endpoint": [ { "Name":"!MQConnectivityEndpoint","IPAddr":"127.0.0.1",
"Enabled":true,"Total":0,"Active":0,"Messages":0,"Bytes":0,"LastErrorCode":0,"ConfigTime":"2016-04-27T16:42:33.464-05:00",
"ResetTime":null,"BadConnections":0 }]
}