Configure a queue manager for use with the metering service instance on IBM Cloud Private
Set up security and IBM Cloud registration information for the queue manager, and then connect to the metering service instance that you already created.
Your IBM Cloud Private metering service instance dashboard shows data for only the queue managers that are configured to include the security and IBM Cloud Private registration information.
Procedure
- Follow the ICP documented steps for creating a service ID at: Create a service ID by using IBM Cloud Private CLI.
- Follow the ICP documented steps for creating an API key at: API key management APIs.
- Download the TLS certificates from the ICP cluster. Make a note of the location where you downloaded the certificates to. We can add the downloaded certificates to the keystore for the queue manager, in step 9.
- Create a text file apikeyfile.txt and add the API key value that you copied in the previous task. Note the location of the apikeyfile.txt so we can include the path to it in step 8. This file must be readable by the queue manager user ('mqm' on UNIX systems). The file must contain only the API key itself, not a JSON payload, for example d9c11b45-4dda-4de4-c0b2-2e4e1004dc64.
- Create the queue manager, for example, QM1. For more information, see Create and managing queue managers on Multiplatforms.
- Start the queue manager QM1. For more information, see Starting a queue manager.
-
Remember to set up the IBM MQ command line
environment before you run IBM MQ commands.
Run the setmqenv command. On
AIX :
. /usr/mqm/bin/setmqenv -s
On Linux :. /opt/mqm/bin/setmqenv -s
On Windows:"C:\Program Files\IBM\MQ\bin\setmqenv.cmd" -n installation name
-
Create an SSL truststore for the queue manager QM1.
Begin creating the truststore, on AIX:Amend for
AIX
runmqckm -keydb -create -db MQ data directory/qmgrs/QM1/ssl/key.kdb -pw password -type cms -expire 30 -stash
On Linux:runmqckm -keydb -create -db MQ data directory/qmgrs/QM1/ssl/key.kdb -pw password -type cms -expire 30 -stash
On Windows:runmqckm -keydb -create -db "MQ data directory\qmgrs\QM1\ssl\key.kdb" -pw password -type cms -expire 30 -stash
-
Add the digital certificates that you downloaded in step 3, to the queue manager's truststore.
On AIX:
runmqckm -cert -add -db MQ data directory/qmgrs/QM1/ssl/key.kdb -pw password -type cms -label RootCA -file Download_location/RootCA.crt -format ascii -trust enable runmqckm -cert -add -db MQ data directory/qmgrs/QM1/ssl/key.kdb -pw password -type cms -label ServerCert -file Download_location/CERT.crt -format ascii -trust enable
On Linux:runmqckm -cert -add -db MQ data directory/qmgrs/QM1/ssl/key.kdb -pw password -type cms -label RootCA -file Download_location/RootCA.crt -format ascii -trust enable runmqckm -cert -add -db MQ data directory/qmgrs/QM1/ssl/key.kdb -pw password -type cms -label ServerCert -file Download_location/CERT.crt -format ascii -trust enable
On Windows:runmqckm -cert -add -db "MQ data directory\qmgrs\QM1\ssl\key.kdb" -pw password -type cms -label RootCA -file "Download_location\RootCA.crt" -format ascii -trust enable runmqckm -cert -add -db "C:\ProgramData\IBM\MQ\qmgrs\QM1\ssl\key.kdb" -pw password -type cms -label ServerCert -file "Download_location\CERT.crt" -format ascii -trust enable
-
Add the new ReportingService stanza with the
apikeyfile path to the queue manager's qm.ini file:
ReportingService: APIKeyFile=APIKey file location/apikeyfile.txt
-
Add the API host value to the qm.ini file.
The ReportingService stanza section now
contains path to the apikeyfile and the API host
(ServiceURL) values:
ReportingService: APIKeyFile=APIKey file location/apikeyfile.txt ServiceURL=https://productinsights-api.ng.bluemix.net
Save and exit the qm.ini file. - Restart the queue manager for the changes to take effect. We might be asked to grant permission for the queue manager process amqzmur0 to access the network. The access is required to enable the queue manager to contact the metering service.
- View the information about the queue manager QM1 in your metering service instance. When the reporting status is active, the startup and usage information for all integration servers on the specified integration node is reported to the metering service. The usage information is updated every 15 minutes.
- Optional: Stop a queue manager from reporting to the metering service, by removing the ReportingService stanza from the queue manager's qm.ini file and restart the queue manager.
- Optional:
Check the diagnostic information in the queue manager's log file if the queue manager fails to
report startup or usage information to the metering service.
Amend for AIXOn AIX:
/var/mqm/qmgrs/QM1/errors/AMQERR0*.log
On Linux:/var/mqm/qmgrs/QM1/errors/AMQERR0*.log
On Windows:C:\ProgramData\IBM\MQ\errors\AMQERR0*.log