Viewing store statistics by using an external application

External monitoring applications can access store data that is published by Eclipse Amlen by subscribing to the Eclipse Amlen topic $SYS/ResourceStatistics/Store.

To publish monitoring data on a topic, the Eclipse Amlen server must be running.

The published data is in JSON format. The published data always includes Version, NodeName, Timestamp, and ObjectType. NodeName is the name of the server and ObjectType is the name of the object that you are monitoring.

For more information about monitoring by using an external application, see Monitoring and reporting.

Monitoring data is automatically published every 2 seconds to the topic string $SYS/ResourceStatistics/Store.

In MQTT, you cannot subscribe to a $SYS topic if you specify cleanSession=0. In JMS, you cannot subscribe to a $SYS topic if you use a durable subscription.

  1. Create an endpoint. You can use this endpoint to connect your external monitoring application to Eclipse Amlen and create a monitoring subscription. For more information about configuring an endpoint, see Configuring message hubs.
  2. Strengthen your security by configuring this endpoint specifically for monitoring, with connection and messaging policies to restrict access to monitoring data that is published on the topic root $SYS.
    For more information about configuring connection and messaging policies, see Configuring message hubs.
  3. Connect your external application to the endpoint that you created in step 1, and subscribe to the topic string $SYS/ResourceStatistics/Store.

The following information is made available to the monitoring application:

  • Version
    String
    Specifies the version of server.
  • NodeName
    String
    Specifies the name of the server.
  • Timestamp
    Date/Time
    Specifies the date and time in ISO8601 format.
  • Object type
    String
    Specifies the type of object that you are monitoring.
  • MemoryUsedPercent
    Numeric
    Specifies the percentage of persistent memory that is used, and, therefore, not available.
  • DiskUsedPercent
    Numeric
    Specifies the percentage of disk space that is used.
  • DiskFreeBytes
    Numeric
    Specifies the amount of disk space, in bytes, that is available.
  • Pool1TotalBytes
    Shows the amount of memory, in bytes, in pool 1.
  • Pool1UsedBytes
    Shows the amount of memory, in bytes, that is currently in use in pool 1.
  • Pool1UsedPercent
    Shows the percentage of memory that is in use in pool 1.
  • Pool1RecordSizeBytes
    Shows the size, in bytes, of each record in pool 1.
  • Pool1RecordsLimitBytes
    Shows the overall amount of memory, in bytes, that can be used by client applications.
  • Pool1RecordsUsedBytes
    Shows the amount of memory, in bytes, that is being used for client records.
  • ClientStatesBytes
    Shows the memory allocated for clients which must be remembered when they are disconnected. In MQTT, these are clients that connected using a cleanSession=0 setting or clients that connected and set a will message the quality of service of which is 1 or 2.
  • QueuesBytes
    Shows the memory, in bytes, allocated for queues. Memory is allocated in this category for each queue that is created for point-to-point messaging.
  • TopicsBytes
    Shows the memory, in bytes, allocated for topic records. The server allocates memory in this category for each topic with a persistent retained message.
  • SubscriptionsBytes
    Shows the memory, in bytes, allocated for durable subscription records. In MQTT, these are subscriptions for clients that connected using a cleanSession=0 setting.
  • TransactionsBytes
    Shows the memory, in bytes, allocated for transaction records. The server allocates memory in this category for each transaction.
  • MQConnectivityBytes
    Shows the memory, in bytes, allocated for connectivity with IBM® MQ queue managers.
  • Pool2TotalBytes
    Shows the amount of memory, in bytes, in pool 2.
  • Pool2UsedBytes
    Shows the amount of memory, in bytes, that is currently in use in pool 2.
  • Pool2UsedPercent
    Shows the percentage of memory that is in use in pool 2.
  • IncomingMessageAcksBytes
    Shows the memory, in bytes, allocated for acknowledging incoming messages. The server allocates memory in this category for MQTT clients that connected using a cleanSession=0 setting and are publishing messages the quality of service of which is 2. This memory is used to ensure once-and-once-only delivery.

The following example shows statistical information about the usage of the persistent (non-volatile) memory and disk.

{
"Version":"1.2",
"NodeName":"mar#678",
"TimeStamp":"2014-08-22T06:54:17.462Z",
"ObjectType":"Store",
"DiskUsedPercent":16,
"DiskFreeBytes":33043476480,
"MemoryUsedPercent":0,
"MemoryTotalBytes":268434944,
"Pool1TotalBytes":187904512,
"Pool1UsedBytes":128,
"Pool1UsedPercent":0,
"Pool1RecordsLimitBytes":93952256,
"Pool1RecordsUsedBytes":128,
"Pool2TotalBytes":80530432,
"Pool2UsedBytes":315392,
"Pool2UsedPercent":0