Gathering Statistics with SEMP

SEMP can be used by applications to gather statistics from an event broker. Almost every CLI command issued to an event broker has a corresponding SEMP counterpart, and these can be used to build simple applications, even over the command line.

Example Command to Gather Statistics

The example command show below can be run on a UNIX system to get the Message VPN stats connected to an event broker:

curl http://192.168.1.2:80/SEMP -u admin:admin -d "<rpc semp-version='soltr/5_5'> <show> <message-vpn> <vpn-name>test_vpn</vpn-name> <stats/> </message-vpn> </show> </rpc>"

You need to ensure that the event broker’s management URL and VPN name are replaced with the corresponding values. XPath can be used to filter the output of the command to extract certain values, such as the total ingress discards on a VPN.

Using this facility, third party monitoring frameworks such as Nagios can be integrated with Solace PubSub+.

In addition to the above, it's possible to use the Solace API to send and receive SEMP requests to monitor an event broker. For more information on sending SEMP requests over the message bus, refer to the sample application SempGetOverMB.java or sempGetOverMb.c, available in the JCSMP and C SDKs. The examples demonstrate how a SEMP request/response can be accomplished over the message bus.

Important Statistics

Shown below are some important event broker statistics which can be gathered using SEMP. This is not a comprehensive list; for more information refer to the Solace CLI reference. These are intended to serve as a starting point for event broker monitoring using SEMP, and you should monitor additional statistics using SEMP as required by your applications' use-cases.

System Level Statistics

System Level Stats CLI Command Description

show version

Returns details of the current SolOS version running on the appliance

show hardware detail

Returns details of hardware on the Solace appliance such as power supplies, HBA link status and LUN details, etc.

show disk Returns details of the disks on the appliance as well as the RAID's redundancy state
show redundancy Returns the state of appliance redundancy and links to the mate ADB
show message-spool detail Returns the state of the message-spool as well as appliance level details of endpoints, ingress and egress flows, transactions, etc
show message-spool rates Returns the ingress and egress message rates for guaranteed messaging for each message-vpn
show stats client Returns the total number of clients connected to an appliance
show replication statistics Returns details of number of messages queued to the replication mate as well as those which have been received when on standby
show config-sync database Returns the state of the config-sync database for all message-vpns

Message VPN Level Statistics

Message VPN Level Stats CLI Command Description

show message-vpn <name> stats

Returns message-vpn level statistics such as number of ingress and egress discards, active connections and subscriptions, and ingress & egress message rates. The active connections and subscriptions can be used as indicator of the current capacity of a message-vpn.

show message-spool message-vpn <vpn-name> stats

Returns ingress and egress discard statistics and transaction processing statistics for a given message-vpn

show message-spool message-vpn <vpn-name> rates Returns the ingress and egress, message rates for each endpoint in the message-vpn
show config-sync database message-vpn <vpn-name> detail Returns the details of the config-sync database for a message vpn such as ownership details and sync state
show message-vpn <vpn-name> replication detail Returns the replication state for a message-vpn including the state of the replication bridge and replication queue.

Client Level Statistics

Client Level Stats CLI Command Description

show client <name> message-vpn <vpn-name> stats

Returns important client details as well as ingress and egress statistics

show client <name> message-vpn <vpn-name> connections wide

Returns TCP level details on the connection, such as retransmits, as well as send and receive queue details

show client <name> stats queues [detail] Returns details of a client as well as the state of its egress buffers
show client <name> slow-subscriber Returns the list of clients which have been marked as slow subscribers by the appliance

Queue Level Statistics

Queue Level Stats CLI Command Description

show queue <name> detail

Returns queue details such as bind count, current spool usage, etc

show queue <name> subscriptions

Returns queue details as well as topic subscriptions added to it and its creator

show queue <name> stats Returns statistics such as number of messages spooled, high water mark, flow ID, number of messages deleted and expired as well as client bind statistics

Bridge Level Statistics

Bridge Level Stats CLI Command Description

show bridge <name> message-vpn <vpn-name> detail

Returns bridge level statistics such as bridge connection state and uptime, remote message-vpn state, etc

show bridge <name> message-vpn <vpn-name> stats

Returns statistics of total messages sent and received long with ingress and egress message rates

PubSub+ Cache Level Statistics

SolCche Level Stats CLI Command Description

show cache-instance <name> message-vpn <vpn-name> detail

Returns the administrative and operational status of a PubSub+ Cache instance, as well as configuration details.

show cache-instance <name> message-vpn <vpn-name> remote status

Returns details of cached data such as number of messages and topics cached, as well as current incoming and outgoing data message rates, and number of messages discarded.

show cache-instance <name> message-vpn <vpn-name> remote topics Returns details of topic subscriptions on which the cache-instance contains data, as well as the number of current and cumulative messages for each topic.
show cache-cluster <name> message-vpn <vpn-name> detail Returns configuration details of the cache-cluster such as max-memory and max-topics as well as event thresholds
show distributed-cache <name> message-vpn <name> detail Returns details of the distributed cache configuration such as scheduled-delete and heartbeat-timeout.