Show MQTT client monitoring statistics by REST Monitoring APIs

Purpose

Reports MQTT client monitoring data.

URI

Use the Eclipse Amlen REST API GET method with the following Eclipse Amlen monitoring URI:

http://<admin-endpoint-IP:Port>/ima/v1/monitor/MQTTClient

Object configuration data

Provide query parameters requesting the statistics that you want returned in the JSON payload. The following example uses cURL to create MQTT client-related statistics:

curl -X GET http://127.0.0.1:9089/ima/v1/monitor/MQTTClient?ClientID=ClientID%26StatType=StatType
%26ResultCount=ResultCount
ClientID
Specifies the name of an MQTT client to collect data about.
You can use an asterisk (*) as a wildcard to match 0 or more characters. To use a wild card, you must specify ClientID in the query.
The default value is *
ResultCount
Specifies the maximum number of results to return
This value can be one of the following values: 10, 25, 50, 100.
The default value is 25.
StatType
Specifies the type of data to order the results by.
This value can be one of the following values:
  • LastConnectedTimeOldest
    Orders the monitoring data by the most recent date that the MQTT client connected to Eclipse Amlen.
    This value is the default value.

Usage NotesĀ®

  • 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 MQTT client must have a durable subscription, and must be disconnected, for monitoring data about that client to be returned.
  • The following fields are returned:
    • ClientId
      String
      The Client ID.
    • IsConnected
      Boolean
      Whether the client is connected to the Eclipse Amlen server. In Release 1 only disconnected clients are shown.
    • LastConnectedTime
      Boolean
      The time at which the client last connected to the Eclipse Amlen server.

Example

The following example uses cURL to show how a GET method is used to create statistics about a disconnected MQTT Client with a Client ID that is set to DemoClientID:

curl -X GET http://127.0.0.1:9089/ima/v1/monitor/MQTTClient?ClientID=DemoClientID
 
 

The following example shows a successful example response to the GET method that was used to create statistics about a disconnected MQTT Client with a Client ID that is set to DemoClientID:

{ "Version":"v1", "MQTTClient": [ { "ClientID":"DemoClientID","IsConnected":False,"LastConnectedTime":1446728129213566618 } ] }