OpsView check_snmp_runningproc not matching process list

June 29, 2010
By Killian

I was adding a few checks for oracle processes using check_snmp_runningproc and noticed a few problems. It seems that when the check returns a list of processes from a remote host it lowercases them all and attempts to strips out .e .ex and .exe extensions. The extensions used in the regular expression weren’t escaping the dot which resulted them in stripping out any character followed by an e, ex or exe.

In my case this meant it was matching against “orac” instead of oracle. I also noticed that the user input wasn’t undergoing the same translations as the returned processes (both the conversion to lower case and the stripping of extensions). I fixed this by cleaning up the regexp, and using an lc() function and the same regexp for user input. I submitted the patch which has been included in SVN. The most up to date version of this check is here:

http://svn.opsview.org/opsview/trunk/opsview-core/nagios-plugins/check_snmp_runningproc

Tags: ,

Leave a Reply

Calendar

    June 2010
    M T W T F S S
    « Jul    
     123456
    78910111213
    14151617181920
    21222324252627
    282930