Viewing connection level statistics by REST Monitoring APIs
System administrators can view connection level monitoring statistics by using REST Monitoring APIs.
System administrators can view connection level statistics by using a REST Monitoring API, or by using the Amlen WebUI. For more information about using the Amlen WebUI to view connection level statistics, see Viewing connection level statistics by using the GUI.
Connection level monitoring statistics can be created by using a REST Monitoring API. Connection
monitoring data is periodically collected and cached. The cache for connection monitoring
data is updated every 60 seconds. Therefore, the statistics that are produced can be up to
60 seconds out of date and might not be available immediately if the command is issued at
Eclipse Amlen server start time. To create
connection level monitoring statistics, complete the following steps:
The following fields are returned:
-
- Name
- String
-
- Protocol
- String
-
- ClientAddr
- String
-
- UserId
- String
-
- Endpoint
- String
-
- Port
- Numeric
-
- ConnectTime
- Numeric
-
- Duration
- Numeric
-
- ReadBytes
- Numeric
-
- ReadMsg
- Numeric
-
- WriteBytes
- Numeric
-
- WriteMsg
- Numeric
The following example uses cURL to show how a GET method is used to create statistics about connections ordered by the highest throughput of messages:
curl -X GET http://127.0.0.1:9089/ima/v1/monitor/Connection?Endpoint=DemoEndpoint%26StatType=HighestThroughputMsgs
The following example shows a successful example response to the GET method that was used to create statistics about endpoints with the highest throughput of messages:
{ "Version":"v1", "Connection": [ { "Name":"DemoClientId","Protocol":"mqtt","ClientAddr":"9.20.230.65","UserId":"",
"Endpoint":"DemoEndpoint","Port":16102,"ConnectTime":1446728129213566618,"Duration":160676522991,"ReadBytes":39,"ReadMsg":0,
"WriteBytes":14,"WriteMsg":0} } ] }