Monitoring IBM MQ
After you install the Instana agent, IBM MQ sensor is installed automatically. You can view metrics that are related to IBM MQ in the Instana UI after you configure IBM MQ sensor as outlined in the Configuring section.
- Supported information
- Common scenarios
- High availability (HA) scenarios
- Important IBM MQ monitoring concepts
- Configuring
- Viewing metrics
- Health signatures
- Troubleshooting IBM MQ sensor
- Tracing
Supported information
Supported operating systems
-
The supported operating systems of IBM MQ sensor are consistent with host agents requirements, which can be checked in the Supported operating systems section of the Windows, Unix, or Linux host agent:
-
For the supported operating systems of IBM MQ Tracing, see Supported operating systems for IBM MQ Tracing.
Supported IBM MQ versions
-
Instana IBM MQ sensor supports monitoring metrics and configuration data for IBM MQ 8.0.0 and later.
-
Instana IBM MQ Tracing supports IBM MQ 9.0.0 and later.
Common scenarios
IBM MQ sensor can work in a Kubernetes cluster, Docker, virtual machine, and bare metal in hybrid environments. It can also monitor both local and remote Queue Manager in current complex environments. See the following common scenarios for reference:
-
If the Instana host agent and IBM MQ run in the same virtual machine, then this local monitoring supports both the local binding mode and the client binding mode to connect to the Queue Manager. Monitoring IBM MQ Queue Manager instances through the local or client binding modes depend on the presence of the user account into the
mqm
group of IBM MQ to run the Instana host agent: -
If the user account is added in the
mqm
group, then IBM MQ sensor automatically monitors all IBM MQ Queue Manager instances through the local binding mode. -
If the user account is not in the
mqm
group, then IBM MQ sensor monitors all IBM MQ Manager instances through the client binding mode. In such a condition, you need to configure some MQ connection parameters in the agent configuration file<agent_install_dir>/etc/instana/configuration.yaml
.
For more information about MQ connection parameters, see the Instana agent in a virtual machine section.
- If the Instana host agent and IBM MQ run in the same Kubernetes cluster or in the same Docker environment, this kind of local monitoring can support only the client binding mode to connect to Queue Manager. To use the client binding mode to monitor IBM MQ Queue Manager instances, you need to configure some IBM MQ connection parameters in the agent configuration file. For more information, see the Instana agent in a Kubernetes cluster and Instana agent in a Docker container sections.
- If the Instana host agent and IBM MQ run in different environments, this kind of remote monitoring can support only the client binding mode to connect to Queue Manager. To use the client binding mode to monitor IBM MQ Queue Manager instances, you need to configure some IBM MQ connection parameters in the agent configuration file. For more information, see the Remote monitoring with the client binding mode section.
High availability (HA) scenarios
If you use the Instana agent to monitor IBM MQ HA Queue Managers, then you need to install the Instana host agent with the monitored Queue Manager instances.
Replicated data queue manager (RDQM) support
You need to install the Instana host agent on each Queue Manager instance of the RDQM host. Then, the running and standby Queue Manager instances are automatically discovered and monitored by local monitoring. The Instana UI displays only
1 RDQM name with the aggregated data of 3 Queue Manager instances. You can view the information about HA Type
, Running Node
, and Standby Nodes
values on the dashboard of the running Queue Manager in
the Instana UI.
Important IBM MQ monitoring concepts
The following concepts are used in the Configuring section. Ensure that you fully understand these concepts and their differences before you start the configuration.
Local binding mode and client binding mode
These 2 modes refer to the connection mode that IBM MQ sensor connects to Queue Manager.
- By using the local binding mode, IBM MQ sensor can do fully automatic discovery and monitoring. By using the client binding mode, IBM MQ sensor can do only partially automatic discovery. In addition, you need to provide some connection parameters.
- By using local binding mode, more monitoring metrics including metrics from local files can be provided. By using client binding mode, IBM MQ sensor can provide only metrics that are retrieved from IBM MQ PCF interface and IBM MQ queues.
- If you use the local binding mode, you need to only add the Instana agent user to the
mqm
group of IBM MQ, and then all the IBM MQ data can be monitored. - For client binding mode, you need to configure Queue Manager name, channel name, and related authority to connect to Queue Manager as a client application.
Local monitoring and remote monitoring
These 2 monitoring methods show whether IBM MQ sensor is in the same environment as Queue Manager.
- If IBM MQ sensor and Queue Manager are in the same environment, this is called local monitoring. If they are not in the same environment, this is called remote monitoring.
- The locally monitored Queue Manager instance is shown as one layer in the separated host or Kubernetes cluster node in the Infrastructure Map page of the Instana UI.
- The remotely monitored Queue Manager instances are shown in the Infrastructure Map page as separate boxes in an availability zone, and these instances are grouped by the
availabilityZone
configuration property or IBM MQ cluster name if present. If a Queue Manager instance is not running in the cluster mode and theavailabilityZone
configuration property is not defined, Queue Manager is shown in theUndefined
zone. - By using the local monitoring, IBM MQ sensor can connect to Queue Manager by either the local binding mode or client binding mode.
- By using the remote monitoring, IBM MQ sensor can connect to Queue Manager only by the client binding mode.
- The collection of monitoring metrics is decided by the connection modes: local binding mode or client binding mode. The local binding mode can collect more metrics in local files.
Configuring
Instana supports monitoring of both remote and local IBM MQ Queue Manager instances.
-
By using the local binding mode, IBM MQ sensor can do fully automatic discovery and monitoring. So you don't need to do the configuration steps in this section. However, you need to add the Instana agent user to the
mqm
group of IBM MQ, and then all the IBM MQ data can be monitored. -
By using the client binding mode, IBM MQ sensor can do only partially automatic discovery. You need to configure the following fields in the agent configuration file
<agent_install_dir>/etc/instana/configuration.yaml
:
com.instana.plugin.ibmmq:
enabled: true
poll_rate: 60 # The default is 60 seconds. The minimum value is 30 seconds.
queueManagers:
QMGR01: # Your Queue Manager name here. If there are queue managers with the same name, it is required to append '-<instance>' in the queue manager name to distinguish them. You can select any string for <instance>.
host: '127.0.0.1' # Queue Manager host, required for remote monitoring. Remove it for local monitoring or when Instana agent is on Kubernetes cluster. (Optional)
port: '1414' # Remote administration channel port, required for remote monitoring. Remove it for local monitoring or when Instana agent is on Kubernetes cluster. (Optional)
channel: 'SYSTEM.ADMIN.SVRCONN' # Server connection channel
username: 'mqmuser' # User ID to connect to MQ. (Required only when user ID and password checking is enabled. Optional)
password: 'mqmuser' # User password to connect to MQ. (Required only when user ID and password checking is enabled. Optional)
queuesIncludeRegex: '.*' # Regex for filtering inclusive queues. An example for multiple conditions: (^AMQ\..*)|(^ECHO\..*)|(^SYSTEM\.DEAD\..*) (Optional)
queuesExcludeRegex: '' # Regex for filtering exclusive queues. An example for multiple conditions: (^AMQ\..*)|(^ECHO\..*)|(^SYSTEM\.DEAD\..*) (Optional)
customEventQueues: 'SYSTEM.ADMIN.PERFM.EVENT, SYSTEM.ADMIN.CHANNEL.EVENT, SYSTEM.ADMIN.QMGR.EVENT' # User defined queue names to read performance/channel/qmgr events. Separated by comma. (Optional)
availabilityZone: 'IBM MQ Custom Zone' # Cluster name will be used by default. (Optional)
keystore: '/tmp/application.jks' # Keystore path for TLS connection. (Required only when TLS is enabled)
keystorePassword: 'password' # Keystore password for TLS connection. (Required only when TLS is enabled)
cipherSuite: 'TLS_RSA_WITH_AES_256_CBC_SHA256' # TLS cipher suite for TLS connection. (Required only when TLS is enabled)
poll_rate: 60 # Metrics poll rate in seconds. The minimum value is 30 seconds. (Optional)
QMGR02: # Your Queue Manager name here. If there are queue managers with the same name, it is required to append '-<instance>' in the queue manager name to distinguish them. You can select any string for <instance>.
host: '127.0.0.1' # Queue Manager host, required for remote monitoring. Remove it for local monitoring or when Instana agent is on Kubernetes cluster. (Optional)
port: '1415' # Remote administration channel port, required for remote monitoring. Remove it for local monitoring or when Instana agent is on Kubernetes cluster. (Optional)
channel: 'SYSTEM.ADMIN.SVRCONN' # Server connection channel
username: 'mqmuser' # User ID to connect to MQ. (Required only when user ID and password checking is enabled)
password: 'mqmuser' # User password to connect to MQ. (Required only when user ID and password checking is enabled)
queuesIncludeRegex: '.*' # Regex for filtering inclusive queues. An example for multiple conditions: (^AMQ\..*)|(^ECHO\..*)|(^SYSTEM\.DEAD\..*) (Optional)
queuesExcludeRegex: '' # Regex for filtering exclusive queues. An example for multiple conditions: (^AMQ\..*)|(^ECHO\..*)|(^SYSTEM\.DEAD\..*) (Optional)
customEventQueues: 'SYSTEM.ADMIN.PERFM.EVENT, SYSTEM.ADMIN.CHANNEL.EVENT, SYSTEM.ADMIN.QMGR.EVENT' # User defined queue names to read performance/channel/qmgr events. Separated by comma. (Optional)
availabilityZone: 'IBM MQ Custom Zone' # Cluster name will be used by default. (Optional)
keystore: '/tmp/application.jks' # Keystore path for TLS connection. (Required only when TLS is enabled)
keystorePassword: 'password' # Keystore password for TLS connection. (Required only when TLS is enabled)
cipherSuite: 'TLS_RSA_WITH_AES_256_CBC_SHA256' # TLS cipher suite for TLS connection. (Required only when TLS is enabled)
poll_rate: 60 # Metrics poll rate in seconds. The minimum value is 30 seconds. (Optional)
Notes:
- If two IBM MQ Queue Manager instances with the same name is configured, you need to append different
-<instance>
to the Queue Manager name to distinguish them in the same configuration file. You can select any string for<instance>
. - The
customEventQueues
is a list of user-defined queue names to read the performance, channel, and Queue Manager events. This field is optional. If this field is not defined, the default queue namesSYSTEM.ADMIN.PERFM.EVENT
,SYSTEM.ADMIN.CHANNEL.EVENT
, andSYSTEM.ADMIN.QMGR.EVENT
are used to read the performance, channel, and Queue Manager events. You can define 1 to 3 items so that the specified event queues are used to read events. - The
queuesIncludeRegex
orqueuesExcludeRegex
list is a regex expression to filter queues. If both lists are defined, the exclusive list has the priority over the inclusive list.
Support matrix of IBM MQ connection mode
See the following support matrix for IBM MQ connection mode:
Support matrix | Queue Manager in a virtual machine | Queue Manager in a Kubernetes cluster | Queue Manager in a Docker container |
---|---|---|---|
Instana agent in a virtual machine | Local monitoring and remote monitoring | Remote monitoring | Remote monitoring |
Instana agent in a Kubernetes cluster | Not supported | Local monitoring | Not supported |
Instana agent in a Docker container | Local monitoring and remote monitoring | Remote monitoring | Local monitoring |
Monitoring IBM MQ in a virtual machine
When the Instana host agent and IBM MQ run in the same virtual machine, 2 connection modes are supported: local binding mode and client binding mode.
Local monitoring with the local binding mode
You need to add the user account of the Instana host agent to the mqm
group, and then IBM MQ sensor uses the local binding mode to retrieve data from IBM MQ.
By using the local binding mode, IBM MQ sensor can discover IBM MQ Queue Manager instances automatically and show all the data. You don't need to set anything in the Instana agent configuration file.
Local monitoring with the client binding mode
If the user account to run Instana agent isn't in the mqm
group, IBM MQ sensor needs to use the client binding mode to retrieve data from IBM MQ. You need to configure IBM MQ connection parameters in the agent configuration
file.
-
Configure the
ibmmq
plugin section in the agent configuration file as follows:In this mode, you need to configure the
ibmmq
plugin section in the agent configuration file. The Queue Manager name and channel name are needed at least. Because the host and port can be automatically discovered with the local monitoring, you don't need to configure the host and port in the agent configuration file. See the following configuration example:com.instana.plugin.ibmmq: enabled: true poll_rate: 60 queueManagers: QMGR03: # Your Queue Manager name here. If there are queue managers with the same name, it is required to append '-<instance>' in the queue manager name to distinguish them. You can select any string for <instance>. channel: '<INSERT_CHANNEL_HERE>' # Remote administration channel
-
Configure other authorities based on your IBM MQ configurations. If the security of IBM MQ is enabled, you need to configure the user and password. If TLS of IBM MQ is enabled, you need to provide keystore-related information in the agent configuration file. See the following configuration example:
Note: For keystore certificate file, only the jks file is supported.
com.instana.plugin.ibmmq: enabled: true poll_rate: 60 queueManagers: QMGR03: # Your Queue Manager name here. If there are queue managers with the same name, it is required to append '-<instance>' in the queue manager name to distinguish them. You can select any string for <instance>. channel: '<INSERT_CHANNEL_HERE>' # Remote administration channel username: '<INSERT_USERNAME_HERE>' # User ID to connect to MQ (optional) password: '<INSERT_PASSWORD_HERE>' # User password to connect to MQ (optional) keystore: '<INSERT_KEYSTORE_PATH_HERE>' # Keystore path for TLS connection (required only when TLS is enabled for remote monitoring. Optional) keystorePassword: '<INSERT_KEYSTORE_PASSWORD_HERE>' # Keystore password for TLS connection (required only when TLS is enabled for remote monitoring. Optional) cipherSuite: '<INSERT_CIPHER_SUITE_HERE>' # TLS cipher suite for TLS connection (required only when TLS is enabled for remote monitoring. Optional)
By using the client binding mode, IBM MQ sensor can partially discover some configurations such as host and port automatically in the local monitoring and show metrics in the Instana UI.
Note: When the Instana host agent and IBM MQ run in different virtual machines, only the client binding mode is supported.
Remote monitoring with the client binding mode
In this mode, IBM MQ sensor also uses the client binding mode to retrieve and show data from IBM MQ. You need to configure IBM MQ connection parameters in the agent configuration file. The configuration steps are the same as in the Local monitoring with the client binding mode section. By using the client binding mode in the remote monitoring, you need to configure the host and port because IBM MQ sensor can't discover them in remote monitoring. The metrics are also showed in the Instana UI.
Monitoring IBM MQ in a Kubernetes cluster
When the instana host agent and IBM MQ run in the same Kubernetes cluster, only local monitoring with the client binding mode is supported.
Client binding mode configurations for local monitoring in Kubernetes clusters
In this mode, when the Instana host agent and IBM MQ run in the same Kubernetes cluster, only the client binding mode is supported because the host agent and Queue Manager can not run in the same pod. You need to configure IBM MQ connection parameters in the agent configuration file as follows. Because the host and port can be automatically discovered, don't set them to avoid duplicate querying of all Queue Manager instances in the Kubernetes cluster.
com.instana.plugin.ibmmq:
enabled: true
poll_rate: 60
queueManagers:
QMGR03: # Your Queue Manager name here. If there are queue managers with the same name, it is required to append '-<instance>' in the queue manager name to distinguish them. You can select any string for <instance>.
channel: '<INSERT_CHANNEL_HERE>' # Remote administration channel
For Instana host agent on Kubernetes cluster, if TLS is enabled for monitored Queue Manager instances on Kubernetes cluster, you also need to configure TLS in the agent configuration file. Follow the steps:
-
Create a secret with the user jks file as follows:
kubectl create secret generic keystore-secret-name --from-file=./<jks-file-name>.jks -n instana-agent-namespace
Note: Replace <jks-file-name> with the user jks file that you use. For the certificate file, only the jks file is supported.
-
Add the secret
mountPath
into thevolumeMounts
andvolumes
sections, and then update the secretmountPath
to the keystore directory in the ibmmq section of the agent configuration file.volumeMounts: - name: mq-key-jks-name subPath: jks-file-name.jks mountPath: /opt/instana/agent/etc/jks-file-name.jks volumes: - name: mq-key-jks-name secret: secretName: keystore-secret-name
Note: Do not set the host and port in the agent configuration file, but grant authority to connect to Queue Manager in the Kubernetes cluster. The metrics are also showed in the Instana UI.
Monitoring IBM MQ in Docker
When the Instana host agent and IBM MQ run in different Docker containers in the same virtual machine, only local monitoring with the client binding mode is supported because Instana host agent and IBM MQ run in different Docker operating systems. In such scenario, you need to configure IBM MQ connection parameters in the agent configuration file. Because IBM MQ sensor discovers IBM MQ Queue Manager instances automatically, you don't need to set the host and port in the agent configuration file.
Local monitoring with client binding mode
The configuration steps are the same as in the Local monitoring with the client binding mode section. You don't need to configure the host and port in the agent configuration file. The metrics are also showed in the Instana UI.
Remote monitoring with client binding mode
The configuration steps are the same as in the Remote monitoring with the client binding mode section.
Extra IBM MQ configurations
Some MQ metrics require that the queue statistics data, Queue Manager performance or channel events from IBM MQ side are enabled. If you want to collect these metrics, you need to do the following actions:
-
To collect the queue metrics Last Put Time, Last Get Time, Oldest Message Time, and On Queue Message Time, enable the queue statistic by running the RUNMQSC command alter ql(QUEUE_NAME) MONQ(LOW) by the queue level or by running the command alter qmgr MONQ(LOW) by the Queue Manager level.
For more information, see IBM MQ documents.
-
To collect the built-in events Bridge stopped, Channel conversion error, Channel SSL Error and Queue Service Interval High, the Queue Manager performance events (
PERFMEV
) and channel events (CHLEV
) need to be enabled by running the following RUNMQSC command:alter qmgr PERFMEV(ENABLED) CHLEV(ENABLED)
For more information, see IBM MQ documents.
-
To collect MQ queue statistics metrics as Persistent Put Bytes, Nonpersistent Put Bytes, Persistent Get Bytes, Nonpersistent Get Bytes, Expired Msg Count, Put Fail Count, Put1 Fail Count, Get Fail Count, the following steps are required from IBM MQ:
- If you want to get all the queues statistics data, you need to enable queues statistics data collection by Queue Manager level as follows:
alter qmgr STATQ(ON)
If you want to get only a specific queue statistics data, you need enable it by queue level with your specific Queue_Name as follows:
alter qlocal(Queue_Name) STATQ(ON)
You can also change the queue statistics interval by using the IBM MQ Queue Manager parameter STATINT, which is 1800 seconds by default. For example, run the command alter qmgr STATINT(900).
- To get statistics data from SYSTEM.ADMIN.STATISTICS.QUEUE, you need to grant the get authority to the Instana agent user because the statistics data is collected from this queue. For example, run the command setmqaut -m QmgrName -n SYSTEM.ADMIN.STATISTICS.QUEUE -t q -p user +get. For more information, see IBM MQ documents.
Viewing metrics
After you complete the configuration steps in the Configuring section, you can view metrics that are related to IBM MQ in the Instana UI.
To view the metrics, complete the following steps:
- In the sidebar of the Instana UI, select Infrastructure.
- Click a specific monitored host.
- Locally monitored Queue Manager instance is shown as one layer in the separated host or Kubernetes cluster node in the Infrastructure Map page of the Instana UI.
- Remotely monitored Queue Manager instances are shown in the Infrastructure Map page as separate boxes in an availability zone. These instances are grouped by the
availabilityZone
configuration property or IBM MQ cluster name if present. If a Queue Manager instance is not running in cluster mode and theavailabilityZone
configuration property is not defined, Queue Manager is shown in theUndefined
zone.
Then, you can see a host dashboard with all the collected metrics and monitored processes.
For detailed metrics that IBM MQ sensor supports, see Viewing IBM MQ metrics.
Health signatures
For each sensor, there is a curated knowledgebase of health signatures that are evaluated continuously against the incoming metrics and are used to raise issues or incidents depending on user impact.
Built-in events trigger issues or incidents based on failing health signatures on entities, and custom events trigger issues or incidents based on the thresholds of an individual metric of any given entity.
For information about built-events for the IBM MQ sensor, see the Built-in events reference.
Troubleshooting IBM MQ sensor
Most problems that you might encounter are related to IBM MQ connection and authority. See the following problems:
Local monitoring with the local binding mode
After you add the Instana agent user to the mqm
group, for the already running Queue Managers, ensure that the security settings are taken effective.
You need to either refresh security by running the following IBM MQ runmqsc command or restart Queue manager to make the mqm
authority that you granted take effective.
REFRESH SECURITY
Local or remote monitoring with the client binding mode
For the client binding mode, IBM MQ sensor behaves as a client application to connect to Queue Manager. So the sensor requires the same authority as any other applications to connect to Queue Manager, such as MQ explore. When you find Queue Manager can not be connected with your configured parameters, you can try your connection parameters with MQ explore to connect to Queue Manager and check whether Queue Manager can be connected.
See the following issues for reference:
-
Listener is not started.
Solution: Start the listener. You can start listener by running the following IBM MQ runmqsc command:
START LISTENER($Listener_Name)
-
No authority is granted to connect to the server connection channel. For example, some system server connection channels like
SYSTEM.AUTO.SVRCONN
are blocked by default.Solution: Unblock the user for system server connection channel before the user is used, or define your own server connection channel for connection.
-
Security is enabled or TLS is enabled, but the corresponding username and password or keystore parameters are not provided.
Solution: Provide corresponding username and password or keystore parameters in the agent configuration file.
-
The host and port are configured in the agent configuration file in the Kubernetes cluster. But when Queue Manager is restarted, the host IP is changed, which caused the problem that Queue Manager cannot be connected by IBM MQ sensor.
Solution: Make the host and port information automatically discovered by deleting the host and port in the agent configuration file for the host agent in the Kubernetes cluster.
Tracing
The configuration steps in the Configuring section are for monitoring and collecting IBM MQ metrics. You can continue to use IBM MQ Tracing on your IBM MQ hosts as you need.
To use IBM MQ Tracing, you must install and enable IBM MQ Tracing first. For detailed steps, see IBM MQ Tracing.