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.
You can use this information to understand:
  • If the number of buffered messages is growing, shrinking, or is constant over time.
  • If the number of buffered messages is higher than expected for your system at a point in time.
  • If your system is able to process the number of messages that are passing through it.
You can also use this statistic in conjunction with the server memory usage statistics on the Amlen WebUI dashboard to help with your capacity planning. Use this information to understand how many messages can be buffered on your server. For example, server memory usage might be at 50% with 4 million buffered messages, and at 60% with 8 million buffered messages.
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.
The RetainedMessages statistic does not represent the number of topics with a retained message, as a single topic might have multiple retained messages that are inflight.
You can use this information to understand:
  • If the number of retained messages is growing, shrinking, or is constant over time.
  • If the number of retained messages is higher than expected for your system at a point in time.
  • If your system is able to process the number of messages that are passing through.
You can also use this statistic in conjunction with the server memory usage statistics on the Amlen WebUI dashboard to help with your capacity planning. Use this information to understand how many messages can be retained on the server. For example, the server memory usage might be at 50% with 4 million retained messages, and at 60% with 8 million retained messages.
ExpiredMessages
This statistic provides a count of the number of expired messages on queues and subscriptions on the Eclipse Amlen server.
You can use this information to understand:
  • If the number of expired messages is growing, shrinking, or is constant over time.
  • If the number of expired messages is higher than expected for your system at a point in time.
  • If your system is able to process the number of messages that are passing through it.
You can also use this statistic in conjunction with the server memory usage statistics on the Amlen WebUI dashboard to help with your capacity planning.
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.