Monitoring an IBM MQ Appliance’s Resources using the REST API
James Robertson 506C8866A7 Visits (3992)
With the release of v9.0.1, a number of monitoring features have been released on the IBM MQ Appliance. One of these is support for the REST API that allows a system administrator to monitor the appliance remotely using HTTPS requests. Status monitoring is an incredibly useful tool, and with the introduction of REST there are now 51 different possible status monitoring classes to view! Some of the more useful ones are provided as examples further down.
The REST API
RESTful web services, or Representational State Transfer, allows for requests to be made to a server by providing a specific URI and expecting a response that may be in XML, HTML, JSON or some similar format. The MQ Appliance returns REST requests as JSON. Using HTTPS, there are predefined options such as GET, POST, PUT, DELETE and so on, that allow you to request information about the server or update it.
To use this new API, a system administrator should choose a tool suitable to their environment, whether it be using curl from the command line, or a web-browser based plugin such as RESTClient or Postman.
Enabling the REST API on an IBM MQ Appliance
The REST API can be enabled through the WebUI of the IBM MQ Appliance by logging in and navigating to Objects > Device Management > REST Management Interface and checking the box next to “Enable administrative state”. Make sure to save the changes.
To enable it from the IBM MQ Appliance’s command line interface, run “config; rest-mgmt; admin-state enabled; exit; write mem; exit;”.
Retrieving Status Provider Data
One example of using the REST API with the IBM MQ Appliance is retrieving status information and monitoring its available resources. To retrieve status provider data a system administrator can send the following GET request:
Here, there are 51 different possible classes that all provide different information about the IBM MQ Appliance. One of the most interesting status providers is the QueueManagersStatus class, which can provide names, statuses, cpu usage, memory usage and HA status by visiting:
For more examples, visit the MQ-Appliance GitHub repository where four examples of using the REST API have been created using Node.js to retrieve information from the IBM MQ Appliance.
For more information about the REST management interface, you can view the DataPower developerWorks tutorial. The first part of five can be found at the link below: