A quick note about the Nagios check_procs plugin

I had an issue today where check_procs returned “0 processes with command name ‘some-process-name’ “. When I did a ps -ef | grep some-process-name I could see the process running, so I was like “wtf?!”, but then a collegue told me he had seen this before. Seems the check_procs uses something like ps -cA to check for running-processes and using those parameters, you only see part of the process name, so while it wouldnt match “some-process-name” it would match “some-process-n”. So if you wonder why it returns 0 processes, do a ps -cA to find the right process name to match in your config.

Be Sociable, Share!

Tags: , ,

2 Responses to “A quick note about the Nagios check_procs plugin”

  1. Jess Says:

    Hi, i tried searching based on output of ‘ps -cA’ but check_procs still did not worked for me =(

    my exact output :

    ~/nagios/nrpe/libexec% ps -cA | grep dataserv
    3365 TS 59 ? 458:10 dataserv
    3418 TS 59 ? 423:37 dataserv
    3419 TS 59 ? 609:08 dataserv
    ~/nagios/nrpe/libexec% ./check_procs -w 3:3 -C dataserv
    PROCS WARNING: 0 processes with command name ‘dataserv’

  2. mortis Says:

    Hi!

    Try and add -vvv to your command to see whats going on.

    ~/nagios/nrpe/libexec% ./check_procs -w 3:3 -C dataserv -vvv

    what does it say?

Leave a Reply