Page 2 of 3

Re: Queue depth monitoring

Posted: Tue Oct 01, 2019 5:12 am
by RIDS_I2MP
Hello,

I searched for this plugin but could not find any documentation.

Can you help us with other plugin which would help us to complete request?
I was able to find check_mq plugin which is under Nagios support. Can you please advise?

Re: Queue depth monitoring

Posted: Tue Oct 01, 2019 9:36 am
by lmiltchev
I searched for this plugin but could not find any documentation.
Have you tried contacting the developer (owner) of the plugin? We wouldn't be able to test the plugin in-house, however you can upload it on the forum. We will do some digging into this, and see if we can figure out the correct syntax that needs to be used.
Can you help us with other plugin which would help us to complete request?
I was able to find check_mq plugin which is under Nagios support. Can you please advise?
Supported plugins would be the ones that are part of the "official" nagios plugins:
https://nagios-plugins.org/downloads/
or the ones, that are included (shipped with) Nagios XI by default.

Plugins that are listed on the Nagios Exchange (including check_mq) are usually 3rd party plugins. They are not officially supported. We can try helping you with any of them, but cannot guarantee that they will work/work well.

Re: Queue depth monitoring

Posted: Thu Oct 03, 2019 3:51 am
by RIDS_I2MP
Hello,

I have checked the check_queue_depth plugin and it seems that I am doing some mistake with service definition.

I am attaching the script here. Can you please check it once and help us with service definition?

Hostname: eu1pmwu050
Queue Manager Name : PRFGMQA4
Queue Name to be Monitored: WBIA.EESOCC1.REQQ

Thanks for you continuous support :)

Re: Queue depth monitoring

Posted: Thu Oct 03, 2019 8:16 am
by lmiltchev
I looked at the script, and noticed that it requires four separate arguments.
QM=$1
Queue=$2
warn=$3
critical=$4
In your case, these would be:
PRFGMQA4
WBIA.EESOCC1.REQQ
500
1000
So, instead of wrapping your arguments in quotes (and passing them as one argument this way):

Code: Select all

/usr/local/nagios/libexec/check_queue_depth "PRFGMQA4 WBIA.EESOCC1.REQQ 500 10000"
try removing the quotes, and pass them as 4 args:

Code: Select all

/usr/local/nagios/libexec/check_queue_depth PRFGMQA4 WBIA.EESOCC1.REQQ 500 10000
Also, I've never seen a shebang with two pound signs. It may be OK and still work, but you may want to probably change it just in case. Change this:

Code: Select all

##!/bin/bash
to this:

Code: Select all

#!/bin/bash
Save, exit, and try your check locally (on the remote machine). If it works, then you can test the check_nrpe on the Nagios XI server. Thanks!

Re: Queue depth monitoring

Posted: Wed Oct 09, 2019 3:44 am
by RIDS_I2MP
Hello,

I have changed the line in script as below:

#!/bin/bash

And restarted nrpe service on it.

Still m getting the same error:'

PRODUCTION> nagios@eu1pmwu050: /usr/local/nagios/libexec > /usr/local/nagios/libexec/check_queue_depth PRFGMQA4 WBIA.EESOCC1.REQQ 500 10000
Unknown - Queue Depth of the WBIA.EESOCC1.REQQ is not found
PRODUCTION> nagios@eu1pmwu050: /usr/local/nagios/libexec >

Re: Queue depth monitoring

Posted: Wed Oct 09, 2019 10:35 am
by scottwilkerson
We don't have this equipment so I'm not 100% sure, but is it possible that the first 2 arguments are flipped?

Can you run

Code: Select all

/usr/local/nagios/libexec/check_queue_depth WBIA.EESOCC1.REQQ PRFGMQA4 500 10000

Re: Queue depth monitoring

Posted: Thu Oct 10, 2019 2:43 am
by RIDS_I2MP
Hi,

Below is the output:

PRODUCTION> nagios@eu1pmwu050: /usr/local/nagios/libexec > /usr/local/nagios/libexec/check_queue_depth WBIA.EESOCC1.REQQ PRFGMQA4 500 10000
Unknown - Queue Depth of the PRFGMQA4 is not found
PRODUCTION> nagios@eu1pmwu050: /usr/local/nagios/libexec >

Re: Queue depth monitoring

Posted: Thu Oct 10, 2019 6:41 am
by scottwilkerson
Has this plugin every worked for you?

Do you get output running wither of these commands?

Code: Select all

runmqsc WBIA.EESOCC1.REQQ

Code: Select all

runmqsc PRFGMQA4

Re: Queue depth monitoring

Posted: Thu Nov 14, 2019 9:18 am
by RIDS_I2MP
Hello,

My apologies for late reply, was stuck in a production issue from last three weeks.

Yes, this plugin is working on another server. I have copied the plugin from that server to the server on which we are currently working. Also, I have copied the service so that there should be no difference.

PRODUCTION> nagios@eu1pmwu050: /usr/local/nagios/libexec > runmqsc WBIA.EESOCC1.REQQ
5724-H72 (C) Copyright IBM Corp. 1994, 2016.
Starting MQSC for queue manager WBIA.EESOCC1.REQQ.
AMQ8118: IBM MQ queue manager does not exist.

No MQSC commands read.
No commands have a syntax error.
All valid MQSC commands were processed.
PRODUCTION> nagios@eu1pmwu050: /usr/local/nagios/libexec >

==============

PRODUCTION> nagios@eu1pmwu050: /usr/local/nagios/libexec > runmqsc PRFGMQA4
5724-H72 (C) Copyright IBM Corp. 1994, 2016.
Starting MQSC for queue manager PRFGMQA4.
AMQ8146: IBM MQ queue manager not available.

No MQSC commands read.
No commands have a syntax error.
All valid MQSC commands were processed.
PRODUCTION> nagios@eu1pmwu050: /usr/local/nagios/libexec >


Not sure why its not working particularly for this sevrer.

Re: Queue depth monitoring

Posted: Thu Nov 14, 2019 9:24 am
by scottwilkerson
Looking at the plugin again, it looks like it runs the following, can you run this and show the output

Code: Select all

echo "DISPLAY QUEUE(WBIA.EESOCC1.REQQ) CURDEPTH" | runmqsc PRFGMQA4
and

Code: Select all

echo "DISPLAY QUEUE(WBIA.EESOCC1.REQQ) CURDEPTH" | runmqsc PRFGMQA4 | grep 'CURDEPTH(' | rev | cut -d'(' -f1 | rev | cut -d')' -f1