NRPE Check Differeneces

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
jdev
Posts: 12
Joined: Fri Jan 24, 2014 7:03 am

Re: NRPE Check Differeneces

Post 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
You do not have the required permissions to view the files attached to this post.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: NRPE Check Differeneces

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
jdev
Posts: 12
Joined: Fri Jan 24, 2014 7:03 am

Re: NRPE Check Differeneces

Post 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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: NRPE Check Differeneces

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
jdev
Posts: 12
Joined: Fri Jan 24, 2014 7:03 am

Re: NRPE Check Differeneces

Post 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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: NRPE Check Differeneces

Post 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
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
jdev
Posts: 12
Joined: Fri Jan 24, 2014 7:03 am

Re: NRPE Check Differeneces

Post 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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: NRPE Check Differeneces

Post 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
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
jdev
Posts: 12
Joined: Fri Jan 24, 2014 7:03 am

Re: NRPE Check Differeneces

Post 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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: NRPE Check Differeneces

Post 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?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked