Page 2 of 6
Re: New NRPE error - error receiving data from daemon
Posted: Thu Feb 28, 2013 3:43 pm
by psyllex
The problem is I didn't set any of this up. I just installed Nagios XI using a VM from Nagios that runs CentOS and ran the Linux server wizard. I never actually typed up these commands, these are from the Linux Server Wizard not myself. And that's just one command there are about 30 others.
Re: New NRPE error - error receiving data from daemon
Posted: Thu Feb 28, 2013 3:49 pm
by abrist
Did you install nrpe from the wizard agent download, from the distro's repos, or from source?
Re: New NRPE error - error receiving data from daemon
Posted: Thu Feb 28, 2013 4:10 pm
by psyllex
I took the link from the wizard and downloaded that and then move it over to my remote servers.
Re: New NRPE error - error receiving data from daemon
Posted: Thu Feb 28, 2013 4:41 pm
by abrist
If you used the agent, you should have a file called common.cfg on the remote host located in the directory /usr/local/nagios/etc/nrpe, this will have the default checks that are setup by the wizard. It should look like:
Code: Select all
### GENERIC SERVICES ###
command[check_init_service]=sudo /usr/local/nagios/libexec/check_init_service $ARG1$
command[check_services]=/usr/local/nagios/libexec/check_services -p $ARG1$
### MISC SYSTEM METRICS ###
#command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10
command[check_users]=/usr/local/nagios/libexec/check_users $ARG1$
command[check_load]=/usr/local/nagios/libexec/check_load $ARG1$
command[check_swap]=/usr/local/nagios/libexec/check_swap $ARG1$
command[check_cpu_stats]=/usr/local/nagios/libexec/check_cpu_stats.sh $ARG1$
command[check_mem]=/usr/local/nagios/libexec/custom_check_mem -n $ARG1$
### YUM UPDATES ###
command[check_yum]=/usr/local/nagios/libexec/check_yum
### DISK ###
command[check_disk]=/usr/local/nagios/libexec/check_disk $ARG1$
command[check_ide_smart]=/usr/local/nagios/libexec/check_ide_smart $ARG1$
### PROCESSES ###
command[check_all_procs]=/usr/local/nagios/libexec/custom_check_procs
command[check_procs]=/usr/local/nagios/libexec/check_procs $ARG1$
### OPEN FILES ###
command[check_open_files]=/usr/local/nagios/libexec/check_open_files.pl $ARG1$
### NETWORK CONNECTIONS ###
command[check_netstat]=/usr/local/nagios/libexec/check_netstat.pl -p $ARG1$ $ARG2$
This file is called by the directive:
Code: Select all
include_dir=/usr/local/nagios/etc/nrpe
These are the commands that should have been setup by the wizard. Are you still receiving the error "CHECK_NRPE: Received 0 bytes from daemon"?
If so, post the messages log form the remote host:
You may want to turn debugging on before running aforementioned tail:
Change:
In your remote host's nrpe.cfg
To:
And then restart nrpe:
Code: Select all
sudo /etc/init.d/nagios-nrpe-server restart
Re: New NRPE error - error receiving data from daemon
Posted: Thu Feb 28, 2013 4:45 pm
by psyllex
Real quick reply....the remote hosts do not have a file /usr/local/nagios.....they do have a file /usr/lib/nagios.
I was just fishing around in this which is how I noticed that.
Re: New NRPE error - error receiving data from daemon
Posted: Thu Feb 28, 2013 4:48 pm
by abrist
Ahhh, ubuntu specific agent install directories. I must be off my game. Substitute the correct paths in my previous post.
Re: New NRPE error - error receiving data from daemon
Posted: Thu Feb 28, 2013 4:55 pm
by psyllex
There is no common file. There is only a directory /usr/lib/nagios/plugins which contains all of the plugins (executable).
Re: New NRPE error - error receiving data from daemon
Posted: Thu Feb 28, 2013 5:07 pm
by abrist
You should have them, unless you installed from source or repositories. How about the following location?
?
Re: New NRPE error - error receiving data from daemon
Posted: Thu Feb 28, 2013 5:08 pm
by psyllex
And there is not messages file in /var/log.
Re: New NRPE error - error receiving data from daemon
Posted: Thu Feb 28, 2013 5:12 pm
by slansing
Did you find common.cfg at:
This is where the agent installs it to, assuming you used our documentation.