Menu Close

IBM MQ SCOM Management Pack

QuickDownload:  https://github.com/thekevinholman/IBMMQMP

This is a Management Pack that will discover and monitor IBM MQ / IBM WebSphere MQ servers on Windows.

Discovers and monitors:

  • MQ Server (Service Running)
  • Queue Managers (Status)
  • Queues (Status, Queue Depth, Queue Percent Used, IPROCS, OPROCS)
  • Listeners (Status, Sessions)
  • Channels (Status)

This is loosely based on a previous community MP, but is a complete re-write.  Changes include:

  • Streamlined class and monitor structure
  • Changed all VBScript workflows to PowerShell
  • Re-wrote all monitoring workflows to support cookdown.

Discovery is based on the existence of the MQ_Installation1 service (registry).

Queue Managers are then discovered.  Once the queue mangers are discovered, we discover the Channels, Listeners, and Queues from there.

Events logged:  Discoveries:  (7100 – 7104) Monitoring workflows:  (17000 – 17004)

This is a good sample MP to demonstrate multi-role applications, relationships, dependency monitors, and multi-instance objects needing cookdown.

image

image

image

image

image

image

 

Notes:

  • The IBM MQ Server role discovery looks for existence of HKLM\SYSTEM\CurrentControlSet\Services\MQ_Installation1.  You might need to change this logic for multiple installations or non-default installations.  I welcome feedback here.
  • The IPPROCS monitor is disabled by default because it can be noisy for default SYSTEM queues.
  • You can disable discovery of all SYSTEM.* queues, by a simple edit in the Queue Discovery script.  Change the line with:
    • [bool]$DiscoverSystemQueues = $true
      • to:
    • [bool]$DiscoverSystemQueues = $false

23 Comments

  1. Morag Hughson

    Hi Kelvin, does the statement “Discovery is based on the existence of the MQ_Installation1 service (registry)” mean that it can only discover one installation of MQ, and only if it is named “Installation1” (the default name for the first installation)? Looking at the XML in your GitHub repository I fear it does.

    • Kevin Holman

      Forgive me – I am not an MQ expert by any means.

      Is it common to install multiple installations of MQ on a box?
      Would you need to monitor those separately?
      Would you have any conflict between queue manager names, queue names, listener names, channel names, on the same computer with two installations?

      • Morag Hughson

        Sorry – didn’t get notification of your reply. Yes, it is certainly common to see a couple of installations, if nothing else to take advantage of short outage times for queue manager upgrades. You don’t have to monitor them separately – an MQ application can connect to two queue managers which are not in the same installation. There would not be a conflict of queue manager names, but there would almost certainly be a conflict of all other objects – for example the SYSTEM objects on each queue manager would be identical. If you key these objects by QMgrName+ObjectName though, you’d be all good.

  2. Frederic B.

    Hi,
    Yes, by default installation of MQ is on MQ_Installation1 If your installation name has changed you have to modify the discovery to target proper registry settings, it will works
    Regards

  3. Suri

    Hi Kevin,

    Thanks a lot for the Management Pack, much needed. Wanted to check with you on the Queue depth value can be modified to percentage value in place of Integer value.

    Regards,
    Suri

    • Kevin Holman

      I have added a new monitor for Queue Percent Used, and a Performance Collection rule for this as well. Also – this helped me come up with a faster way to monitor the queue properties, so it completes faster now as well. My Queue monitoring script (event 17000) was taking 20 seconds to complete, now it completes in 10 seconds. I assume you will see the same impact.

      • Suri

        Thank you for adding the Queue Percent Monitor. Shall remove the existing MP, download the updated MP and import.
        Glad to hear on the performance improvement on the script execution.

        Regards,
        Suri

  4. Suri

    Thank you Kevin for the update. Also wanted to update you on System Queue discovery disabling, I did modify the Queue Discovery script as per your instructions and set the value of – [bool]$DiscoverSystemQueues = $false. Management Pack is still discovering all the Queues including the System Queues.

    And this MP, each IBM MQ as individual server and not as clustered Servers, Hope this is by design. Currently I am working on the IBM MQ servers installed on top of Windows Servers cluster with the Active / Passive configuration.

    Once again thanks a lot for all your support.

    – Suri

    • Kevin Holman

      Hi Suri –

      I re-tested [bool]$DiscoverSystemQueues = $false and it works just fine. Make sure you are using “$false” and not “false” on that line. I had planned to make this an overridable property, but had some trouble. I might work on that more later, but this does indeed work.

      On the Cluster – this MP is not cluster aware. So it will detect the service on each node, and attempt to monitor it from each node. I was not aware using Windows Failover Clusters was popular for IBMMQ. Forgive me, I am not an expert in IBMMQ. Is this pretty typical?

      Also – are there any other default settings that would make more sense for this MP? What do you change in this MP from what I set as default?

      What would be a good default Queue Percent threshold? I chose 50% for warning and 75% for critical out of the box.

      • Suri

        Hi Kevin,

        Thanks for the update, I did modify the SystemDiscoveryQueue with “$false”, Shall try once again.

        On the IBMMQ over Windows cluster is the most preferred and typical way, also depends on the solution design. Is there any way that you would suggest to incorporate to enable this MP as Cluster aware.

        As I am in process of testing the MP, the main parameter which I came across is the percentage as the Queue configuration shall vary. I shall get back to you with the update once the tests are completed.

        Thank you for all your support.

        Regards,
        Suri

      • Suri

        Hi Kevin,

        I have an update and [bool]$DiscoverSystemQueues = $false is working, thanks for your inputs.
        Also I tested the Queue percentage and got the desired results, also performance details are also showing correctly.

        As per the inputs received from my IBM MQ Solution’s team the value set for the out of the box thresholds are fine.

        Regards,
        Suri

        • Suri

          Hi Morag,

          Thank you for sharing your inputs. If you can share more details and also how to handle the Clustered scenario, that would really helpful.

          Regards,
          Suri

  5. Niels

    Hi Kevin,

    I need to edit the “IBM MQ Server Discovery” to look for SYSTEM\CurrentControlSet\Services\MQ_LabMQV92 instead of SYSTEM\CurrentControlSet\Services\MQ_Installation1, but I can’t as the MP is sealed.
    Is there an easy way around this or how would you suggest to implement the MP in this scenario?

    maybe via a future update include an override parameter for the installation name which alters the registry lookup value to the override value

    • Kevin Holman

      Hi Niels,

      I offer the sealed and unsealed versions in the Github. You can choose “Code” > “Download Zip” on the main page and get both files. Then you can make changes and reseal yourself, or run this unsealed.

      That’s a fair request, I should be able to make that happen in a future update.

  6. Erik

    Hi Kevin,

    Something strange is happening with this mp in one of my scom environments.

    In my production scom environment this mp is working as expected, Server, QueueManager, Channels, Listeners and Queues are detected.

    In my lab environment the same is true, except de Queues they are not registrering in scom. I see the events for the queues, but the Queues do not appear in scom. Does you have an idea what could cause this?

  7. Kevin Holman

    The first step in discovery is the “IBM MQ Server” class discovery. This looks for HKLM:SYSTEM\CurrentControlSet\Services\MQ_Installation1. Is this class discovered?

    The second step in discovery is the “Queue Manager” class discovery. This uses a command “dspmq” and parses the output to discover the queue managers, and logs event 7101. Is this class discovered?

    Lastly, the remaining discoveries target the Queue Manager class, and discover the Channel, Listener, and Queue instances.

    Queue discovery script logs event 7104, for troubleshooting. This discovery runs command: “echo Display QL(*) | runmqsc $QueueManagerName” It parses the output of this command and looks for any line that contains: ‘QUEUE\(‘ Then it gathers queue properties using command: “echo Display Queue (‘$QueueName’) TYPE DESCR MAXDEPTH MAXMSGL | runmqsc $QueueManagerName” and parses that output.

    Its possible different versions output the data differently and my parsing design isn’t handling that. I found that once with a customer. The trick is to run the PowerShell scripts manually on the MQ servers and you should be able to detect where something is breaking down. I am not a fan of parsing echo output from a command line as that can have inconsistent results, but since IBM does not give us a really good API or PowerShell module, we have limited capability to interact with IBM MQ.

    • Erik

      In my lab and production environment all of the events appear in de Operations Manager logs. I have the 7101, the 7102, the 7103 and the 7104 events. Only in lab the events do not result in Queues in SCOM. I get QueueManager, the Channels and the Listeners in SCOM, but the Queues remain elusive.
      In production I get the same events, and I get the Queues in SCOM. What could be the cause for the Queues not appearing?
      It’s the same mp, it should respond in the same way.

Leave a Reply

Your email address will not be published. Required fields are marked *