Let's go back to beginning. Should plugin be compiled with or without --enable-command-args on client side?
How about the same plugin on Nagios host server?
check_nrpe!check_load command failed
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: check_nrpe!check_load command failed
Certainly, if you would like to.. You do not need to compile or install anything on the nagios server, check_nrpe is packaged with the plugins pack and is what you require for the Nagios server. On the remote host you will want to enable args, and disable ssl for now so we can test with as few variables as possible..
Re: check_nrpe!check_load command failed
I think NRPE is not supposed to work with nagios 4 ; cf this page
I had the same error :
Then, without the option, the commande works for me :
I've followed a tutorial and made an /etc/nagios/servers/ directory with myServer.cfg file inside, where I defined things like this :
In some places, I read that check_nrpe is supposed to be define in /etc/nagios/commands.cfg, but I've not this file, only 'lcgdm-commands.cfg'.
Creating a command.cfg in /etc/nagios doesn't help and nagios still unstartable.
Any idea welcome
I have the same problem about define check_nrpe :Compatible With
Nagios 1.x
Nagios 2.x
Nagios 3.x
Then I also tried to lauch the check_nrpe directly in a shell.Error: Service check command 'check_nrpe' specified in service 'CPU LOAD' for host 'server2' not defined anywhere!
I had the same error :
It sounds normal, from far I've understood how nrpe is supposed to work, this kind of commands are detailed with parameters in nrpe.cfg (for ScientificLinux 6.5, this file is in /etc/nagios/nrpe.cfg).CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.
# The following examples use hardcoded command arguments...
command[check_users]=/usr/lib64/nagios/plugins/check_users -w 5 -c 10
command[check_load]=/usr/lib64/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
command[check_hda1]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/hda1
command[check_zombie_procs]=/usr/lib64/nagios/plugins/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/lib64/nagios/plugins/check_procs -w 150 -c 200
Then, without the option, the commande works for me :
But I've still this error about check_nrpe not defined, and I stuck on it.[root@server1 nagios]# /usr/lib64/nagios/plugins/check_nrpe -H ip_of_server2 -c check_load
OK - load average: 0.15, 0.08, 0.02|load1=0.150;15.000;30.000;0; load5=0.080;10.000;25.000;0; load15=0.020;5.000;20.000;0;
[root@server1 nagios]#
I've followed a tutorial and made an /etc/nagios/servers/ directory with myServer.cfg file inside, where I defined things like this :
Everything was OK until I added this nrpe's service (with only ssh service, it was working well).define host{
use linux-server
host_name server2
alias server2
address 192.168.xxx.xxx
max_check_attempts 5
check_period 24x7
notification_interval 5
notification_period 24x7
}
###############################################################################
###############################################################################
#
# SERVICE DEFINITIONS
#
###############################################################################
###############################################################################
define service {
use generic-service
host_name server2
service_description SSH
check_command check_ssh
notifications_enabled 1
}
define service {
use generic-service
host_name server2
service_description CPU LOAD
check_command check_nrpe!check_load
}
In some places, I read that check_nrpe is supposed to be define in /etc/nagios/commands.cfg, but I've not this file, only 'lcgdm-commands.cfg'.
Creating a command.cfg in /etc/nagios doesn't help and nagios still unstartable.
Any idea welcome
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: check_nrpe!check_load command failed
tisc0, lets start by you opening a new thread for your issue instead of trying to work in someone elses...
NRPE will work with Core 4 just fine, you do need to have your commands housed somewhere or it is normal to receive an error telling you that you don't have one defined for a host/service you just added. Check your nagios.cfg for cfg_file, and cfg_dir lines, one of them should point to a commands.cfg file, or something named similar. Your nagios.cfg has those "cfg_" definitions so it knows where to pull in objects, and configurations for monitoring from.
NRPE will work with Core 4 just fine, you do need to have your commands housed somewhere or it is normal to receive an error telling you that you don't have one defined for a host/service you just added. Check your nagios.cfg for cfg_file, and cfg_dir lines, one of them should point to a commands.cfg file, or something named similar. Your nagios.cfg has those "cfg_" definitions so it knows where to pull in objects, and configurations for monitoring from.