Can check_snmp_process.pl show PID?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
reinaldo.gomes
Posts: 59
Joined: Wed Apr 02, 2014 9:29 am

Can check_snmp_process.pl show PID?

Post by reinaldo.gomes »

I've been using check_snmp_process.pl for a while and it works just fine. I was wondering how can I make the problematic process' PID show when an alarm comes up.
I can see that when you turn on the -v (verbose) argument, it shows each process ID. But how can I make the plugin show me only the problematic process' PID, along with the regular alarm message?

This is what it shows now:

7 process matching w3wp (> 0), Mem : 560.2Mb > 500 CRITICAL

This is how I wanted it to be:

7 process matching w3wp (> 0), Mem : 560.2Mb (PID 8274) > 500 CRITICAL
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Can check_snmp_process.pl show PID?

Post by sreinhardt »

Well considering I believe, although may be mistake without a look at the code, it is a combined metric for the amount of memory it would really need to show all PIDs. However I do believe it should be possible. Let me take a look in the morning and I will edit my post with what I find.

OK so you have two main places where the pid is stored and used.
the index table at (1.3.6.1.2.1.25.4.2.1.1) lists all processes in numeric order without process name.
The process table at (1.3.6.1.2.1.25.4.2.1) lists all processes by name in alphabetical order, and the last portion of the oid is also the pid of the process.

You can certainly submit a request to tracker.nagios.com for this to be added to the plugin, however it will likely be altered faster if you speak with the original plugin maintainer over at http://sourceforge.net/projects/nagios-snmp/
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
reinaldo.gomes
Posts: 59
Joined: Wed Apr 02, 2014 9:29 am

Re: Can check_snmp_process.pl show PID?

Post by reinaldo.gomes »

Thank you.
Locked