Skip to content

Channel Stats

To retrieve the channel status for any channel running in a QIE instance, call the URI: http(s)://<qie_server>:<management_api_port>/channel/stats with the following payload:

{
   "zoneName": "<desired zone>",
   "channelName": "<desired channel>",
   "formatOutput": true | false
}

Base JSON Payload Definition

Node Description
zoneName REQUIRED: The name of the zone containing the channel.
channelName REQUIRED: The name of the channel.
formatOutput True if the response JSON should be formatted as human readable (default=false).

The following response is received if the zone and channel are found:

HTTP Status: 200

{
   "channelName": "<channel_name>",
   "channelId": "<channel_id>",
   "statsEnabled": <true|false>,
   "rollingAverageMax": <max_records_to_cache>,
   "rollingAverageTimeInSeconds": <number_of_seconds_in_rolling_average>,
   "nodeCounts": [
      {
         "index": <node_index>,
         "description": <node_description>,
         "count": <number_of_message_processed_since_channel_start>,
         "average": <average_processing_time>,
         "rollingCount": <number_of_messages_in_rolling_average>,
         "rollingAverage": <average_rolling_processing_time>
      },
      ….
   ]
}
Node Description
channelName The name of the channel as shown when logged into the QIE service.
channelId The unique ID of the channel.
statsEnabled True if the stats are being gathered for this channel, otherwise false.
rollingAverageMax Maximum number of records to keep in the rolling average. This exists to prevent memory pressure in high volume environments. The default is 50,000 records.
rollingAverageTimeInSeconds Number of seconds to include in the rolling average. The default is 30 seconds.
nodeCounts An array of node counts, each node in the channel has a count object.
index The node index, this is shown on the visual channel editor.
description The node description, this is shown on the visual channel editor.
count Total number of messages processed by this node since the channel was started.
average The average time each message has taken to be processed by this node since the channel was started.
rollingCount The count of messages processed in the last {rollingAverageTimeInSeconds} seconds, with a max of {rollingAverageMax} records.
rollingAverage The average time each message has taken to be processed by this node for the last {rollingAverageTimeInSeconds} seconds with a {rollingAverageMax} records.

If there is an error finding the zone or channel, then the following response is received:

HTTP Status: 400

{
   "error": "<error message>"
}

Example curl commands:

curl -H "apiToken:abc123" --request POST http://qieserver:9999/channel/stats -d '{"zoneName":"myZoneName","channelName":"myChannelName"}'
curl -H "apiToken:abc123" --request POST http://qieserver:9999/channel/stats -d "{\"zoneName\":\"myZoneName\",\"channelName\":\"myChannelName\"}"
curl -H @{"apiToken"="abc123"} -Method POST http://qieserver:9999/channel/stats -Body '{"zoneName":"myZoneName","channelName":"myChannelName"}' | Select-Object -Expand RawContent

This option requires the QIE is properly licensed.