Viewing queue-related statistics by using REST Monitoring APIs

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

System administrators can view queue-related statistics by using the Amlen WebUI, or by using a REST Monitoring API. For more information about using the Amlen WebUI to view queue-related statistics, see Viewing queue related statistics by using the GUI.

Queue-related monitoring statistics can be viewed by using a REST Monitoring API. To create queue-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/<Object Type>

  2. Provide query parameters requesting the statistics that you want returned in the JSON payload. The following example uses cURL to create queue-related statistics:
    curl -X GET http://127.0.0.1:9089/ima/v1/monitor/Queue?Name=Name%26StatType=StatType%26ResultCount=ResultCount

    where:

    • Name
      Optional.
      The name of the queue. You can use an asterisk (*) to match 0 or more characters. The default value is *.
    • StatType
      Optional.
      Specifies the type of data to order the results by.
      This value can be one of the following values:
      • BufferedMsgsHighest
        Queues with the highest backlog of messages.
      • BufferedMsgsLowest
        Queues with the lowest backlog of messages.
      • BufferedPercentHighest
        Queues with the highest relative number of buffered messages, as a percentage of the total number of messages that can be buffered.
      • BufferedPercentLowest
        Queues with the lowest relative number of buffered messages, as a percentage of the total number of messages that can be buffered.
      • BufferedHWMPercentHighest
        Queues with the highest peaks of buffered messages as a percentage of the total number of messages that can be buffered. That is, the queues that have come closest to reaching the Max Messages limit.
      • BufferedHWMPercentLowest
        Queues with the lowest peaks of buffered messages as a percentage of the total number of messages that can be buffered. That is, the queues that have stayed furthest from the Max Messages limit.
      • ProducedMsgsHighest
        Queues with the highest number of messages that are received from a producer.
      • ProducedMsgsLowest
        Queues with the least number messages received from a producer.
      • ConsumedMsgsHighest
        Queues with the greatest number of messages consumed.
      • ConsumedMsgsLowest
        Queues with the least number of messages consumed.
      • ConsumersHighest
        Queues with the highest number of consumers.
      • ConsumersLowest
        Queues with the lowest number of consumers.
      • ProducersHighest
        Queues with the highest number of producers.
      • ProducersLowest
        Queues with the lowest number of producers.
      • ExpiredMsgsHighest
        Queues with the greatest number of expired messages.
      • ExpiredMsgsLowest
        Queues with the lowest number of expired messages.
      • AllUnsorted
        Lists all queue names.
        Any value that is specified for ResultCount is ignored, so setting StatType to AllUnsorted can result in a large number of responses being generated.

      The default is BufferedMsgsHighest.

    • ResultCount
      Optional.
      The maximum number of results to return.

      Options available for selection are 10, 25, 50, and 100.

      The default is 25.

The following fields are returned:
  • Name
    String
    The name of the queue.
  • Producers
    Numeric
    The number of active producers on the queue.
  • Consumers
    Numeric
    The number of active consumers on the queue.
  • BufferedMsgs
    Numeric
    The number of messages that are buffered on the queue and waiting to be consumed.
  • BufferedMsgsHWM
    Numeric
    The highest number of messages that are buffered on the queue since the server was started or the queue was created, whichever is most recent.
  • BufferedHWMPercent
    Numeric
    The peak number of buffered messages, as a percentage of the maximum number of messages that can be buffered.
  • BufferedPercent
    Numeric
    The number of buffered messages as a percentage of the maximum number of buffered messages.
  • MaxMessages
    Numeric
    The maximum number of buffered messages that are allowed on the queue. This value is a guideline, rather than an absolute limit. If the system is running under stress, then the number of buffered messages on a queue might be slightly higher than the MaxMessages value.
  • ProducedMsgs
    Numeric
    The number of messages that are sent to the queue since the server was started or the queue was created, whichever is most recent.
  • ConsumedMsgs
    Numeric
    The number of messages consumed from the queue since the server was started or the queue was created, whichever is most recent.
  • RejectedMsgs
    Numeric
    The number of messages that are not sent to the queue because the maximum number of buffered messages is reached.
  • ExpiredMsgs
    Numeric
    The number of messages that expired on the queue since the server was started or the queue was created, whichever is most recent.

The following example uses cURL to show how a GET method is used to create statistics about queues with the highest backlog of messages:

curl -X GET http://127.0.0.1:9089/ima/v1/monitor/Queue?Name=*%26StatType=BufferedMsgsHighest%26ResultCount=10
 
 

The following example shows a successful example response to the GET method that was used to create statistics about queues with the highest backlog of messages:

{ "Version":"v1", "Queue": [ { "Name":"MyQueue","Producers":5,"Consumers":2,"BufferedMsgs":50,"BufferedMsgsHWM":40,"BufferedHWMPercent":25,
"BufferedPercent":14,"MaxMessages":134,"ProducedMsgs":14670,"ConsumedMsgs":10145,"RejectedMsgs":100,"ExpiredMsgs":10 }
 ] }