Page 1 of 1

Sudden NRDS Error for new devices

Posted: Tue Sep 06, 2016 2:55 pm
by derekb
Hi there,
I've been using NRDS quite a bit to setup remote agents to perform basic checks (check_ping etc) and report back to XI server. I tried to spin up a new Linux device following my normal process, and I've run into some issues.

In the NRDS Config in XI, I've set the following commands:

Code: Select all

command[__HOST__]=/usr/lib/nagios/plugins/check_ping -H localhost -w 200.0,40% -c 400.0,80% -p 1
command[ping ip phone]=/usr/lib/nagios/plugins/check_ping -H 192.168.1.189 -w 200.0,40% -c 400.0,80% -p 1
Plugin_Dir /usr/local/nagios/libexec
Send_Nrdp /usr/local/nrdp/clients/send_nrdp.sh
Tmpdir /usr/local/nrdp/clients/tmp
Update_Config Yes
Update_Plugins Yes

I installed the NRDS config via the install instructions in XI. This works no problem. I manually run the cron entry as follows:

Code: Select all

/usr/local/nrdp/clients/nrds/nrds.pl -H 'Derek Test'
Results in the following output:

Code: Select all

Can't exec "/usr/lib/nagios/plugins/check_ping/check_ping": No such file or directory at /usr/local/nrdp/clients/nrds/nrds.pl line 91, <CONFIG> line 18.
Can't exec "/usr/lib/nagios/plugins/check_ping/check_ping": No such file or directory at /usr/local/nrdp/clients/nrds/nrds.pl line 91, <CONFIG> line 18.
Sent 2 checks to http://nagios.mydomain.com/nrdp/
I've compared the NRDS Config commands to some working devices that I have setup, and the directory paths etc are the same. What am I missing here? I swear I've had this before.

Edit:
I have check_ping in /usr/local/nagios/libexec, but that doesn't work either...

Code: Select all

root@raspberrypi:/usr/local/nrdp/clients/nrds# /usr/local/nagios/libexec/check_ping -H 192.168.1.189 -w 200.0,40% -c 400.0,80% -p 1
bash: /usr/local/nagios/libexec/check_ping: cannot execute binary file: Exec format error
Edit2:
Found this in the Nagios KB, showing "this is a failed execution", but no help to resolve :(
https://support.nagios.com/kb/article.php?id=500

Re: Sudden NRDS Error for new devices

Posted: Tue Sep 06, 2016 3:32 pm
by Box293
derekb wrote:I have check_ping in /usr/local/nagios/libexec, but that doesn't work either...

Code: Select all

root@raspberrypi:/usr/local/nrdp/clients/nrds# /usr/local/nagios/libexec/check_ping -H 192.168.1.189 -w 200.0,40% -c 400.0,80% -p 1
bash: /usr/local/nagios/libexec/check_ping: cannot execute binary file: Exec format error
Is this new client a Raspberry Pi?

The pre-compiled binaries that exist on the Nagios XI server that are pulled down will not work on a Pi.
derekb wrote:Results in the following output:

Code: Select all

Can't exec "/usr/lib/nagios/plugins/check_ping/check_ping": No such file or directory at /usr/local/nrdp/clients/nrds/nrds.pl line 91, <CONFIG> line 18.
Can't exec "/usr/lib/nagios/plugins/check_ping/check_ping": No such file or directory at /usr/local/nrdp/clients/nrds/nrds.pl line 91, <CONFIG> line 18.
Sent 2 checks to http://nagios.mydomain.com/nrdp/
Does /usr/lib/nagios/plugins/check_ping/check_ping exist?

Re: Sudden NRDS Error for new devices

Posted: Tue Sep 06, 2016 3:36 pm
by derekb
It's a new Pi. All of my devices running NRDS are Pi's, which is why I'm a bit shocked that this isn't working.

/usr/lib/nagios/plugins/check_ping/check_ping does NOT exist, which again, has never been an issues -- I haven't had to manually copy plugins over to the Pi when rolling out new devices. I did have a problem a while back where plugins were not copying over to the device and it turned out to be an NRDS/NRDP bug.

Where do you suggest I go from here, sir?

Re: Sudden NRDS Error for new devices

Posted: Tue Sep 06, 2016 3:43 pm
by derekb
Sorry for double-post. I totally forgot, with a new Pi I usually run a script I made that installs NRPE and nagios-plugins before I get around to installing NRDS.

apt-get install nagios-plugins seems to have fixed me up :]

Re: Sudden NRDS Error for new devices

Posted: Tue Sep 06, 2016 3:50 pm
by Box293
Sweet, sounds like you've got it sorted. Is it OK to lock this one?

Re: Sudden NRDS Error for new devices

Posted: Tue Sep 06, 2016 3:50 pm
by derekb
Box293 wrote:Sweet, sounds like you've got it sorted. Is it OK to lock this one?
yup!