Page 9 of 12

Re: check_nrpe

Posted: Mon Dec 21, 2015 3:46 pm
by nebblkshts
apt.cfg disk.cfg flexlm.cfg hppjd.cfg load.cfg mysql.cfg ntp.cfg radius.cfg ssh.cfg
breeze.cfg disk-smb.cfg fping.cfg http.cfg mail.cfg netware.cfg pgsql.cfg real.cfg tcp_udp.cfg
check_nrpe.cfg dns.cfg ftp.cfg ifstatus.cfg mailq.cfg news.cfg ping.cfg rpc-nfs.cfg telnet.cfg
dhcp.cfg dummy.cfg games.cfg ldap.cfg mrtg.cfg nt.cfg procs.cfg snmp.cfg users.cfg

Re: check_nrpe

Posted: Mon Dec 21, 2015 3:58 pm
by rkennedy
Can you please post the contents of /etc/nagios-plugins/config/check_nrpe.cfg?

Re: check_nrpe

Posted: Mon Dec 21, 2015 4:04 pm
by nebblkshts

Code: Select all

# this command runs a program $ARG1$ with arguments $ARG2$
define command {
        command_name    check_nrpe
        command_line    /usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$
}

# this command runs a program $ARG1$ with no arguments
define command {
        command_name    check_nrpe_1arg
        command_line    /usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}

Re: check_nrpe

Posted: Mon Dec 21, 2015 4:17 pm
by rkennedy
Looks like we found the the long lost file! Can you remove the -a from the command below?

Code: Select all

define command {
       command_name    check_nrpe
       command_line    /usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$
}
So it should look like -

Code: Select all

define command {
       command_name    check_nrpe
       command_line    /usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ $ARG2$
}
Restart Nagios, and let us know the result!

Re: check_nrpe

Posted: Mon Dec 21, 2015 4:32 pm
by nebblkshts
I made the change and then all the sudden I was getting flooded with emails so I put it back. The emails were delayed by about 5 minutes but the error did not appear to go away unless I did not wait long enough. Why did it kick all those emails?

Re: check_nrpe

Posted: Mon Dec 21, 2015 4:37 pm
by rkennedy
The reason you received a lot of emails is because it probably broke a few checks when you made this change. The way we would normally run a check_nrpe is with the -a defined seperately.

Can you post the service definition in question that isn't working for us to look at? We should be able to adjust this as needed, knowing now that the -a flag is already defined.

Re: check_nrpe

Posted: Mon Dec 21, 2015 4:52 pm
by nebblkshts
This is one of the services that started screaming...

Code: Select all

define service{
        use                     infra-trivial-service
        host_name               FISE2
        service_description     Backup Drive Space
        check_command           check_nrpe!CheckDriveSize!ShowAll MinWarnFree=10% MinCritFree=5% Drive=f:
        }

This is the email notice:
Notification Type: PROBLEM

Service: Backup Drive Space
Host: FISE2
State: CRITICAL

Date/Time: Mon Dec 21 16:25:42 EST 2015

Additional Info:

Missing argument(s).

Re: check_nrpe

Posted: Mon Dec 21, 2015 4:55 pm
by rkennedy
Yeah, it's because of the -a flag being included in the command already and we had taken it out.

Can you post the service definition of the one that's still not working?

Re: check_nrpe

Posted: Tue Dec 22, 2015 8:15 am
by nebblkshts
This works I just have this error I am trying to correct
checknrpe.png
checknrpe.png (8.28 KiB) Viewed 2771 times

Code: Select all

define service{
        use                     infra-trivial-service
        host_name               LYNCFE2
        service_description     Memory Usage
        check_command           check_nrpe!CheckMem!MaxWarn=85% MaxCrit=92% ShowAll type=physical
        }

Re: check_nrpe

Posted: Tue Dec 22, 2015 10:49 am
by hsmith
Let's change it to this:

Code: Select all

define service{
        use                     infra-trivial-service
        host_name               LYNCFE2
        service_description     Memory Usage
        check_command           check_nrpe!CheckMem!'MaxWarn=85% MaxCrit=92% ShowAll type=physical'
        }
Reload the Nagios service.