Page 2 of 4

Re: NRPE Check Differeneces

Posted: Fri Jan 24, 2014 2:59 pm
by jdev
I've attached the output of ls -la

I checked the paths for the commands, they all point to /use/lib/nagios/plugins (same as on my 32-bit system)

Code: Select all

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_hda1]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /dev/hda1
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 
 
 
# The following examples allow user-supplied arguments and can
# only be used if the NRPE daemon was compiled with support for 
# command arguments *AND* the dont_blame_nrpe directive in this
# config file is set to '1'.  This poses a potential security risk, so
# make sure you read the SECURITY file before doing this.
 
#command[check_users]=/usr/lib/nagios/plugins/check_users -w $ARG1$ -c $ARG2$
#command[check_load]=/usr/lib/nagios/plugins/check_load -w $ARG1$ -c $ARG2$
command[check_disk]=/usr/lib/nagios/plugins/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
#command[check_procs]=/usr/lib/nagios/plugins/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$
I also made sure that check_init_service existed, which it does:

Code: Select all

$ pwd
/usr/lib/nagios/plugins
$ ls -lah check_init_service 
-rwxr-xr-x 1 root root 4.0K Feb  5  2013 check_init_service

Re: NRPE Check Differeneces

Posted: Fri Jan 24, 2014 3:08 pm
by abrist
Can you run the check from the cli as user "nagios"? Additionally, have you restarted nrpe on the remote system after you changed the nrpe.cfg?
Lets see if nrpe works at all - on the nagios server, run:

Code: Select all

./check_nrpe -H <remote host IP>
You should get version output.

Re: NRPE Check Differeneces

Posted: Mon Jan 27, 2014 6:40 am
by jdev
NRPE has been restarted since the changes were made.

I have other monitoring working on this host. Disk, load, open files, ping, swap, total processes, and users checks are all working fine. Its just Cron Scheduling Daemon, SSH server and System Logging Daemon that aren't working.

Here is the output of the command you wanted, as the nagios user.

Code: Select all

[nagios@nagiosxi libexec]$ ./check_nrpe -H 10.22.172.21
NRPE v2.12

Re: NRPE Check Differeneces

Posted: Mon Jan 27, 2014 11:25 am
by abrist
check_init_service is not defined in your nrpe.cfg. Add the following to the remote host's nrpe.cfg:

Code: Select all

command[check_init_service]=/usr/lib/nagios/plugins/check_init_service $ARG1$
And then restart the nrpe service on the remote host.

Re: NRPE Check Differeneces

Posted: Mon Jan 27, 2014 11:37 am
by jdev
abrist wrote:check_init_service is not defined in your nrpe.cfg. Add the following to the remote host's nrpe.cfg:

Code: Select all

command[check_init_service]=/usr/lib/nagios/plugins/check_init_service $ARG1$
And then restart the nrpe service on the remote host.
check_init_service is defined. I specifically stated that I added it in this post as well as copied the excerpt from my nrpe.cfg in this post.

Whats odd is several other hosts appear to be working without having that line added to the remote host.

Re: NRPE Check Differeneces

Posted: Mon Jan 27, 2014 12:11 pm
by abrist
Is there a chance that the agent was installed twice on this system? (once from the agent install script, and once from a repo)

Code: Select all

apt-get install mlocate
updatedb
locate nrpe.cfg

Re: NRPE Check Differeneces

Posted: Mon Jan 27, 2014 12:53 pm
by jdev
Only installed once.

Code: Select all

$ find / -name nrpe.cfg
/etc/nagios/nrpe.cfg
$

Code: Select all

$ mlocate nrpe.cfg
/etc/nagios.nrpe.cfg
$ 
I could try removing and reinstalling the package via apt or dpkg if you think that might help. Here is what is currently installed:

Code: Select all

$ dpkg --get-selections | grep nagios
libnagios-plugin-perl                           install
nagios-agent                                    install
nagios-nrpe-server                              install
nagios-plugins                                  install
nagios-plugins-basic                            install
nagios-plugins-standard                         install
nagios-snmp-plugins                             install

Re: NRPE Check Differeneces

Posted: Mon Jan 27, 2014 1:56 pm
by abrist
Well, this is strange. NRPE should log to the system messages. Can you get a healthy tail of them on the remote host?

Code: Select all

tail -25 /var/log/messages

Re: NRPE Check Differeneces

Posted: Tue Jan 28, 2014 6:56 am
by jdev
Oddly enough, there are no entries for NRPE other than when I restarted the service to see if that would affect anything. I checked /var/log/syslog

Might there be another location that nagios would log to? I was under the impression that everything went into syslog.

Re: NRPE Check Differeneces

Posted: Tue Jan 28, 2014 11:17 am
by abrist
jdev wrote:Oddly enough, there are no entries for NRPE other than when I restarted the service to see if that would affect anything. I checked /var/log/syslog
Just to clarify, you are checking the logs on the remote system, correct?