Viewing server statistics by using REST Monitoring APIs
System administrators can view server-related statistics by using a REST Monitoring API
System administrators can view statistics about the Eclipse Amlen server by using a REST Monitoring API or by using the Amlen WebUI. For more information about using the Amlen WebUI to view statistics about the Eclipse Amlen server, see Viewing memory statistics by using the Amlen WebUI.
Server-related monitoring statistics can be viewed by using a REST Monitoring API. To view
server-related monitoring statistics, complete the following steps:
Use the Eclipse Amlen REST API
GET method with the following Eclipse Amlen monitoring URI:
http://<admin-endpoint-IP:Port>/ima/v1/monitor/Server
The following example uses cURL to show how a GET method is used to view information about the Eclipse Amlen server:
curl -X GET http://127.0.0.1:9089/ima/v1/monitor/Server
The following example shows a successful example response to the GET method:
{ "Version":"v1", "Server": {"ActiveConnections":0,"TotalConnections":0,"MsgRead":0,
"MsgWrite":0,"BytesRead":0,"BytesWrite":0, "BadConnCount":0, "TotalEndpoints":3,
"BufferedMessages":0,"RetainedMessages":0,"ExpiredMessages":0,
"ClientSessions":13,"ExpiredClientSessions":0,"Subscriptions":2}}
where:
- ActiveConnections
- Currently active connections.
- TotalConnections
- Count of connections since Eclipse Amlen was last reset.
- MsgRead
- Count of messages read since reset.
- MsgWrite
- Count of messages written since reset.
- BytesRead
- Count of bytes read since reset.
- BytesWrite
- Count of bytes written since reset.
- BadConnCount
- Count of connections that failed to connect since reset.
- TotalEndpoints
- The number of active endpoints.
- BufferedMessages
- This statistic provides an approximate count of the number of messages (including inflight messages) that are currently buffered on queues and subscriptions on the Eclipse Amlen server.
- RetainedMessages
- This statistic provides an approximate count of the number of retained messages (including inflight messages) that are currently waiting on topics on the Eclipse Amlen server. The messages are waiting to be delivered to new subscribers on those topics when their subscription is created for the first time.
- ExpiredMessages
- This statistic provides a count of the number of expired messages on queues and subscriptions on the Eclipse Amlen server.
- ClientSessions
- The number of clients for which the server has state. Includes all connected clients and disconnected clients that have a session which is not ended.
- ExpiredClientSessions
- The number of client sessions that have been removed since the Eclipse Amlen server restarted. Sessions are expired because of the SessionExpiry interval that is set by an MQTTv5 client, or because of the MaxSessionExpiryInterval of a connection policy.
- Subscriptions
- Total number of subscriptions that are in the system.