New NRPE error - error receiving data from daemon

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
psyllex
Posts: 129
Joined: Thu Dec 20, 2012 2:18 pm

Re: New NRPE error - error receiving data from daemon

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

Re: New NRPE error - error receiving data from daemon

Post by abrist »

Did you install nrpe from the wizard agent download, from the distro's repos, or from source?
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.
psyllex
Posts: 129
Joined: Thu Dec 20, 2012 2:18 pm

Re: New NRPE error - error receiving data from daemon

Post by psyllex »

I took the link from the wizard and downloaded that and then move it over to my remote servers.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: New NRPE error - error receiving data from daemon

Post 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:

Code: Select all

tail -25 /var/log/messages
You may want to turn debugging on before running aforementioned tail:
Change:

Code: Select all

debug=0
In your remote host's nrpe.cfg
To:

Code: Select all

debug=1
And then restart nrpe:

Code: Select all

sudo /etc/init.d/nagios-nrpe-server restart
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.
psyllex
Posts: 129
Joined: Thu Dec 20, 2012 2:18 pm

Re: New NRPE error - error receiving data from daemon

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

Re: New NRPE error - error receiving data from daemon

Post by abrist »

Ahhh, ubuntu specific agent install directories. I must be off my game. Substitute the correct paths in my previous post.
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.
psyllex
Posts: 129
Joined: Thu Dec 20, 2012 2:18 pm

Re: New NRPE error - error receiving data from daemon

Post by psyllex »

There is no common file. There is only a directory /usr/lib/nagios/plugins which contains all of the plugins (executable).
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: New NRPE error - error receiving data from daemon

Post by abrist »

You should have them, unless you installed from source or repositories. How about the following location?

Code: Select all

/etc/nagios/nrpe.d/common.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.
psyllex
Posts: 129
Joined: Thu Dec 20, 2012 2:18 pm

Re: New NRPE error - error receiving data from daemon

Post by psyllex »

And there is not messages file in /var/log.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: New NRPE error - error receiving data from daemon

Post by slansing »

Did you find common.cfg at:

Code: Select all

/etc/nagios/nrpe.d/common.cfg
This is where the agent installs it to, assuming you used our documentation.
Locked