check_nrpe

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
nebblkshts
Posts: 58
Joined: Tue Dec 08, 2015 7:35 am

Re: check_nrpe

Post 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
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: check_nrpe

Post by rkennedy »

Can you please post the contents of /etc/nagios-plugins/config/check_nrpe.cfg?
Former Nagios Employee
nebblkshts
Posts: 58
Joined: Tue Dec 08, 2015 7:35 am

Re: check_nrpe

Post 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$
}
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: check_nrpe

Post 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!
Former Nagios Employee
nebblkshts
Posts: 58
Joined: Tue Dec 08, 2015 7:35 am

Re: check_nrpe

Post 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?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: check_nrpe

Post 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.
Former Nagios Employee
nebblkshts
Posts: 58
Joined: Tue Dec 08, 2015 7:35 am

Re: check_nrpe

Post 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).
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: check_nrpe

Post 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?
Former Nagios Employee
nebblkshts
Posts: 58
Joined: Tue Dec 08, 2015 7:35 am

Re: check_nrpe

Post by nebblkshts »

This works I just have this error I am trying to correct
checknrpe.png
checknrpe.png (8.28 KiB) Viewed 2768 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
        }
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: check_nrpe

Post 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.
Former Nagios Employee.
me.
Locked