Monitoring a queue manager in a Docker container
To monitor a queue manager that is running inside a Docker container, use the agent provided docker file and scripts to build or update the IBM® MQ Advanced for Developers Docker container image.
Before you begin
- Install the WebSphere® MQ agent on your Docker
host.Important: You can choose not to install the agent directly on your Docker host. If you do not want to use the WebSphere MQ agent directly on your Docker host, you must bypass the prerequisite scanner before you install the agent. To do this, enter the following command on the target host before you run the agent installation scripts:
export SKIP_PRECHECK=1
- Download the docker file from the GitHub website (https://github.com/dongcc/apmmq-docker/).
Procedure
- If you already configured an IBM MQ Advanced for Developers Docker container image, and you want to use the WebSphere MQ agent to monitor it, use the provided patch.sh shell script to update your image and run the image. For instructions, see Changing an existing image.
- If you do not have any existing IBM MQ Advanced for Developers Docker container image, build the image from the provide docker file and run it. For instructions, see Building the Docker image.
- To configure a queue manager inside the process space of the Docker container, run the docker exec command non-interactively under Bash. See Running administrative commands.
- Check the status of the node to verify that the container is running correctly. For instructions, see Verifying your container is running correctly.
Changing an existing image
Procedure
Building the Docker image
Procedure
Running administrative commands
About this task
Procedure
To run a command against a running queue manager, run the docker exec
command non-interactively under Bash.
The following command is an example of running the IBM MQ command under Bash:
docker exec \
--tty \
--interactive \
${container_ID} \
bash -c dspmq
By using this method, you have full control over all aspects of the Performance Management installation and IBM MQ installation.
Remember: If you use this method to make changes to the IBM MQ file system, the changes are lost when you re-create your container. To avoid this, make your changes in volumes.
Verifying your container is running correctly
Procedure
To verify whether the image is used as provided or is customized, complete the following steps: