Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I know there are a lot of other similar posts, however none of them have fixes for my problem.

I have Nagios Core 3.2.0 running on a 64bit Ubuntu 10.04.4 LTS server. I am trying to check if the process "smbd" and "ietd" are running on my file server. My file server is 64bit Ubuntu 12.04.2 LTS. I am running NRPE version: 2.12 on the file server. These are my command statemnets in /etc/nagios/nrpe.cfg:

command[check_procs_ietd]=/usr/lib/nagios/plugins/check_procs_ietd -C ietd
command[check_procs_smbd]=/usr/lib/nagios/plugins/check_procs_smbd -C smbd

I was using:

command[check_procs_ietd]=/usr/lib/nagios/plugins/check_procs -C ietd
command[check_procs_smbd]=/usr/lib/nagios/plugins/check_procs -C smbd

But in an attempt to fix this, I cp'd "check_procs" to "check_procs_smbd" and "check_procs_ietd." If I run "check_nrpe" from the nagios server, everythings happy:

root@Univac:/etc/nagios3/conf.d# /usr/lib/nagios/plugins/check_nrpe -H 10.1.1.41 -c check_procs_smbd
PROCS OK: 4 processes with command name 'smbd'
root@Univac:/etc/nagios3/conf.d# /usr/lib/nagios/plugins/check_nrpe -H 10.1.1.41 -c check_procs_ietd
PROCS OK: 1 process with command name 'ietd'

However when I go to the web interface I get two nice red lines with:

NRPE: Command 'check_procs_smbd' not defined 
NRPE: Command 'check_procs_ietd' not defined 

This is what the relevant section of my hosts config looks like:

define service{
        use                             generic-service
        host_name                       fortress
        service_description             iSCSI Target
        check_command                   check_nrpe_1arg!check_procs_ietd
}

define service{
        use                             generic-service
        host_name                       fortress
        service_description             SAMBA
        check_command                   check_nrpe_1arg!check_procs_smbd

I have to use "check_nrpe_1arg" otherwise I get: (No output returned from plugin)

This a fix that works for me with a DRBD plugin.

Also not sure if it's useful, but here is the output from the nrpe daemon with debug enabled:

Mar  8 11:32:25 FORTRESS nrpe[22736]: Starting up daemon
Mar  8 11:32:25 FORTRESS nrpe[22736]: Warning: Daemon is configured to accept command arguments from clients!
Mar  8 11:32:25 FORTRESS nrpe[22736]: Listening for connections on port 5666
Mar  8 11:32:25 FORTRESS nrpe[22736]: Allowing connections from: 10.1.1.127
Mar  8 11:32:49 FORTRESS nrpe[22755]: Connection from 10.1.1.127 port 42679
Mar  8 11:32:49 FORTRESS nrpe[22755]: Host address is in allowed_hosts
Mar  8 11:32:49 FORTRESS nrpe[22755]: Handling the connection...
Mar  8 11:32:49 FORTRESS nrpe[22755]: Host is asking for command 'check_procs_smbd' to be run...
Mar  8 11:32:49 FORTRESS nrpe[22755]: Running command: /usr/lib/nagios/plugins/check_procs_smbd -C smbd
Mar  8 11:32:49 FORTRESS nrpe[22755]: Command completed with return code 0 and output: PROCS OK: 4 processes with command name 'smbd'
Mar  8 11:32:49 FORTRESS nrpe[22755]: Return Code: 0, Output: PROCS OK: 4 processes with command name 'smbd'
Mar  8 11:32:49 FORTRESS nrpe[22755]: Connection from 10.1.1.127 closed.

Any ideas?

share|improve this question
    
Your definitions look good to me and should work with the default definition for check_nrpe_1arg. Please share the following: the host definition for the monitor that is failing, and any output from the nrpe daemon when nagios is running check_nrpe. (your included example seems to be against a manually run test) I suspect that nagios is substituting a different value for $HOSTADDRESS$ than what you are filling in for your test. –  Andrew B Mar 8 '13 at 23:42
    
Are you positive, that these checks have actually been executed from the Nagios server after the change? Are active checks enabled? Have you tried to force them to run from the GUI, checking the time that Nagios will say the next check will be done at? –  Jim Black Mar 10 '13 at 0:56
    
Either you haven't restarted nrpe on the file server, or you're actually connecting to a different server (e.g., you screwed up the nagios config) –  Keith Mar 13 '13 at 20:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.