Skip to main content

IBM MQ Rest API

Pack Assets​

Monitored Objects​

The Pack IBM MQ collects metrics for:

  • Queue-managers
  • Queues

Discovery rules​

Rule nameDescription
App-Ibmmq-Restapi-Queue-Manager-NameDiscover queue managers and monitor statistics
App-Ibmmq-Restapi-Queue-NameDiscover queues and monitor statistics

Collected Metrics​

Metric nameDescriptionUnit
queue manager statusQueue manager status
queue_manager_name#queuemanager.connections.countCurrent number of connections

Prerequisites​

To control your IBM MQ, the Rest API must be configured. E.g: https://www.ibm.com/docs/en/ibm-mq/9.0?topic=api-getting-started-administrative-rest

The Pack supports only the basic authentification.

Setup​

  1. Install the Centreon Plugin on every Poller:
yum install centreon-plugin-Applications-Ibmmq-Restapi
  1. On the Centreon Web interface in Configuration > Monitoring Connector Manager, install the IBM MQ Rest API Pack

Host configuration​

  • Add a new Host and apply the App-Ibmmq-Restapi-custom Host Template

Once the template applied, some Macros have to be configured:

MandatoryNameDescription
XIBMMQAPIPORTPort used (Default: 9443)
XIBMMQAPIPROTOSpecify https if needed (Default: 'https')
XIBMMQAPIURLPATHSpecify api prefix (Default: '/ibmmq/rest/v1/admin')
XIBMMQAPIUSERNAMEApi username
XIBMMQAPIPASSWORDApi password
IBMMQAPIEXTRAOPTIONSAny extra option you may want to add to the command (eg. a --verbose flag)

How to test the Plugin and what are the main options for?​

Once the plugin installed, log into your Centreon Poller CLI using the centreon-engine user account and test the Plugin by running the following command (Parameters such as api-username or api-passwordhave to be adjusted):

/usr/lib/centreon/plugins/centreon_ibmmq_restapi.pl \
--plugin=apps::mq::ibmmq::restapi::plugin \
--mode=queue-managers \
--hostname='10.30.2.79' \
--port='9443' \
--proto='https' \
--url-path='/ibmmq/rest/v1/admin' \
--api-username='myapiusername' \
--api-password='myapipassword' \
--verbose

Expected command output is shown below:

OK: Queue manager 'MQPRD' status: running [channel initiator: running], current number of connections: 43 | 'MQPRD#queuemanager.connections.count'=43;;;0;

The command above monitors queue managers (--mode=queue-managers).

It uses api-username (--api-username='myapiusername'), an api-password (--api-password='myapipassword') and it connects to the host 10.30.2.79 (--hostname='10.30.2.79') on the port 9443 (--port='9443') using https (--proto='https').

All the options as well as all the available thresholds can be displayed by adding the --help parameter to the command:

/usr/lib/centreon/plugins/centreon_ibmmq_restapi.pl \
--plugin=apps::mq::ibmmq::restapi::plugin \
--mode=queue-managers \
--help

Troubleshooting​

Troubleshooting plugins