Broker statistics API

The messaging broker provides a REST API which can be used to gather statistics about the broker and the messaging resources.

Overview

The messaging broker statistics can be accessed by sending a GET request to the HTTP or HTTPS port on which the broker application is listening. The URL path should be of the form contextRoot /opsmanager/application/_self?q=stats. For example:

http://localhost:8081/opsmanager/application/_self?q=stats

The GET request must be sent to the HTTP or HTTPS port of the broker application and not the message service listener port.

The response is a map in JSON format. The following example has been reformatted to illustrate the messaging broker statistics. In reality, the monitoredStats map may contain values in addition to brokerStats.

{
  "monitoredStats" : {
    "brokerStats":{
      "listeners":{
        "MqttLocalListener":{
          "type":"com.ibm.micro.admin.MQTTLocalListener",
          "clients":{
          }
        },
        "MqttTlsListener9091":{
          "type":"com.ibm.micro.admin.MQTTTLSListener",
          "clients":{
            "1208263659970-14-159517058":{
              "protocol":"MQTT",
              "protocolVersion":"4",
              "numberOfInFlightMessages":0,
              "numberOfQueuedMessages":0,
              "numberOfSubscriptions":0,
              "connectionTime":"Tue Apr 15 13:47:40 BST 2008",
              "lastActivityTime":"Tue Apr 15 13:47:44 BST 2008"
            },
            "1208263586505-28-430971312":{
              "protocol":"MQTT",
              "protocolVersion":"4",
              "numberOfInFlightMessages":0,
              "numberOfQueuedMessages":0,
              "numberOfSubscriptions":0,
              "connectionTime":"Tue Apr 15 13:46:27 BST 2008",
              "lastActivityTime":"Tue Apr 15 13:46:27 BST 2008"
            }
          }
        }
      },
      "stats":{
        "bytesSent":12612,
        "bytesReceived":3582,
        "uptime":135,
        "messagesReceived":20,
        "messagesSent":75,
        "version":"2.1.0.2 - cb210-L080409"
      },
      "persistence":{
        "currentObjectStoreSize":3008,
        "persistenceType":2,
        "logSize":3000,
        "maxLogSize":3000,
        "minObjectStoreSize":3000,
        "maxObjectStoreSize":9223372036854775807
      },
      "name":"testBroker1",
      "queues":{
        "queue1":{
          "consumerCount":0,
          "expiryTimeRemaining":2419196585,
          "lifecycle":0,
          "currentDepth":0,
          "maxMessageSize":50,
          "maxQueueDepth":32768
        },
        "storeAndForward:broker2/queue/queue2":{
          "consumerCount":1,
          "expiryTimeRemaining":2419188393,
          "lifecycle":0,
          "currentDepth":0,
          "maxMessageSize":50,
          "maxQueueDepth":32768
        }
      },
      "pipes":{
        "Pbroker2":{
          "isRunning":true,
          "outboundFlows":{
            "Qqueue2":{
            }
          }
        }
      }
    }
  }
}

Version 1.1.0.0.21442