Page 1 of 1

Can check_snmp_process.pl show PID?

Posted: Wed Jun 11, 2014 6:00 pm
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

Re: Can check_snmp_process.pl show PID?

Posted: Wed Jun 11, 2014 9:47 pm
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/

Re: Can check_snmp_process.pl show PID?

Posted: Fri Jun 13, 2014 11:21 am
by reinaldo.gomes
Thank you.