Nagios returns "No output returned from plugin" running process

Posted by user56291 on Server Fault See other posts from Server Fault or by user56291
Published on 2014-06-01T01:41:10Z Indexed on 2014/06/01 3:28 UTC
Read the original article Hit count: 677

Filed under:

I have a nagios server and a bunch of nagios clients that i currently monitor. All the clients are setup with the following nrpe configuration. check_users, check_load... metrics are successfully displayed on the nagios interface but check_nginx and check_server_proxy displayed as "Unknown"-(No output returned from plugin).

As far as i understood nagios simply runs ps command and looks for either the argument strings or the name of the command to verify whether the service is running. Also with -c flag, one can give nagios a threshold to determine the output (ie: -c 1 returns 'OK' for if it finds at least 1 process.)

nrpe_local.cfg:

######################################
# Do any local nrpe configuration here
######################################
allowed_hosts =127.0.0.1,10.0.2.181
command[check_users]=/usr/lib/nagios/plugins/check_users -w 5 -c 10
command[check_load]=/usr/lib/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
command[check_all_disks]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10%
command[check_zombie_procs]=/usr/lib/nagios/plugins/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/lib/nagios/plugins/check_procs -w 150 -c 200
command[check_swap]=/usr/lib/nagios/plugins/check_swap -w 50% -c 25%
command[check_server_proxy]=/usr/lib/nagios/plugins/check_procs -c 1 -a "api-v1/server.js"
command[check_nginx]=/usr/lib/nagios/plugins/check_procs -c 1:30 -C nginx

nagios_server.cfg

...
define host{
    use                     generic-host            ; Name of host template to use
    host_name               plum
    alias                   plum
    address                 10.0.2.88
    check_command           check-host-alive-by-ssh
    }

...
#Check api-proxy-server 

define service{
        use                             generic-service         
        host_name                       plum
        service_description             check api proxy service
        check_command                   check_nrpe!check_server_proxy
        }

define service {
        use                            generic-service         ; Name of service template to use
        host_name                      plum
        service_description            CHECK_NGINX
        check_period                   24x7
        max_check_attempts             3
        normal_check_interval          5
        retry_check_interval           3
        check_command                  check_nrpe!check_nginx
        notifications_enabled          1
}

Also when i run the command on the nagios client:

/usr/lib/nagios/plugins/check_procs -c 1 -a "api-v1/server.js"

I get the desired output

PROCS OK: 1 process with args 'api-v1/server.js'

I would really appreciate any pointers that might help me solve why it nrpe command does not return the desired output on the nagios server panel.

© Server Fault or respective owner

Related posts about nagios