Viewing store statistics by using REST Monitoring APIs

System administrators can view store-related statistics by using a REST Monitoring API

System administrators can view statistics about Eclipse Amlen persistent memory by using a REST Monitoring API, by using the Amlen WebUI, or by using an external monitoring application. For more information about using the Amlen WebUI to view store-related statistics, see Viewing store statistics by using the Amlen WebUI. For more information about using an external application to view store-related statistics, see Viewing store statistics by using an external application.

Store-related monitoring statistics can be viewed by using a REST Monitoring API. To create store-related monitoring statistics, complete the following steps:
  1. Use the Eclipse Amlen REST API GET method with the following Eclipse Amlen monitoring URI:

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

  2. Provide query parameters requesting the statistics that you want returned in the JSON payload. The following example uses cURL to create store-related statistics:
    curl -X GET http://127.0.0.1:9089/ima/v1/monitor/Store?SubType=SubType%26Duration=Duration%26StatType=StatType
    Where:
    • SubType
      Optional.
      Specifies the time period of data to report.
      This value can be one of the following values:
      • Current®
        View a summarized list of store data.
      • History
        View a list of store data as selected on the StatType parameter .
      • MemoryDetail
        View a detailed list of store memory usage.
      The default value is Current.
    • time
      Optional.
      Specifies the time span (in seconds) of the data to be collected.

      Valid value range is 1 - 86400.

      The default value is 1800.

    • StatType
      Optional.
      Specifies the types of data to return when SubType is set to History.
      You can specify multiple values in a comma delimited list. This value can be one of the following values:
      • MemoryUsedPercent
        Shows the percentage of persistent memory that is used, and therefore is not available.
      • DiskUsedPercent
        Shows the percentage of disk space that is used.
      • DiskFreeBytes
        Shows 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. When the pool 1 record limit is reached, records cannot be created for topics with retained messages, durable subscriptions, queues, clients, and connectivity with IBM® MQ queue managers.
      • Pool1RecordsUsedBytes
        Shows the amount of memory, in bytes, that is being used for client records.
      • ClientStatesBytes
        Shows the memory allocated for clients that 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 topics. 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 so that it can complete recovery when the server restarts.
      • 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 default value is DiskUsedPercent. For reasons of compatability with earlier versions, the header StoreDiskUsage is returned when the default is used.

If the SubType is set to History, and monitoring data is not available for the requested statistic, a value of -1 is returned.

For more information about the fields that are returned, see Store Monitoring.

The following example uses cURL to show how a GET method is used to view statistical information about the usage of the persistent memory and disk.

curl -X GET http://127.0.0.1:9089/ima/v1/monitor/Store?SubType=Current  
 
 

The following example shows a successful example response to the GET method that was used to create statistical information about the usage of the persistent memory and disk.:

{ "Version":"v1", "Store": {"DiskUsedPercent":20,"DiskFreeBytes":83618123776,"MemoryUsedPercent":1,"MemoryTotalBytes":268434944,
"Pool1TotalBytes":187904512,"Pool1UsedBytes":0,"Pool1UsedPercent":0,"Pool1RecordsLimitBytes":93952256,"Pool1RecordsUsedBytes":0,
"Pool2TotalBytes":80530432,"Pool2UsedBytes":3944448,"Pool2UsedPercent":4 } }