Page 2 of 2

Re: NRDS Client not downloading plugins

Posted: Fri Mar 04, 2016 10:11 am
by derekb
tgriep wrote:It looks like the permissions may not be setup for the plugin to be copied over.
If the NRDS agent running as the nagios user on your server?

One thing you can try is to run the following to change the permissions on the remote server.

Code: Select all

chmod -R o+rwx /usr/lib/nagios
Then you will have to edit the config on the XI server and hopefully it should copy the plugin over.
I have the cron to run the NRDS check running under the 'root' user currently.

Code: Select all

root@Mucci-Pi:/home/pi# chmod -R o+rwx /usr/lib/nagios
root@Mucci-Pi:/home/pi# /usr/local/nrdp/clients/nrds/nrds.pl -H 'Mucci Farms - RaspberryPi' 2>&1
Can't exec "/usr/lib/nagios/plugins/check_mobotix.sh": No such file or directory at /usr/local/nrdp/clients/nrds/nrds.pl line 91, <CONFIG> line 44.
Can't exec "/usr/lib/nagios/plugins/check_mobotix.sh": No such file or directory at /usr/local/nrdp/clients/nrds/nrds.pl line 91, <CONFIG> line 44.
Can't exec "/usr/lib/nagios/plugins/check_mobotix.sh": No such file or directory at /usr/local/nrdp/clients/nrds/nrds.pl line 91, <CONFIG> line 44.
Can't exec "/usr/lib/nagios/plugins/check_mobotix.sh": No such file or directory at /usr/local/nrdp/clients/nrds/nrds.pl line 91, <CONFIG> line 44.
Can't exec "/usr/lib/nagios/plugins/check_mobotix.sh": No such file or directory at /usr/local/nrdp/clients/nrds/nrds.pl line 91, <CONFIG> line 44.
Can't exec "/usr/lib/nagios/plugins/check_mobotix.sh": No such file or directory at /usr/local/nrdp/clients/nrds/nrds.pl line 91, <CONFIG> line 44.
Can't exec "/usr/lib/nagios/plugins/check_mobotix.sh": No such file or directory at /usr/local/nrdp/clients/nrds/nrds.pl line 91, <CONFIG> line 44.
Can't exec "/usr/lib/nagios/plugins/check_mobotix.sh": No such file or directory at /usr/local/nrdp/clients/nrds/nrds.pl line 91, <CONFIG> line 44.
Can't exec "/usr/lib/nagios/plugins/check_mobotix.sh": No such file or directory at /usr/local/nrdp/clients/nrds/nrds.pl line 91, <CONFIG> line 44.
Can't exec "/usr/lib/nagios/plugins/check_mobotix.sh": No such file or directory at /usr/local/nrdp/clients/nrds/nrds.pl line 91, <CONFIG> line 44.
Can't exec "/usr/lib/nagios/plugins/check_mobotix.sh": No such file or directory at /usr/local/nrdp/clients/nrds/nrds.pl line 91, <CONFIG> line 44.
Can't exec "/usr/lib/nagios/plugins/check_mobotix.sh": No such file or directory at /usr/local/nrdp/clients/nrds/nrds.pl line 91, <CONFIG> line 44.
Can't exec "/usr/lib/nagios/plugins/check_mobotix.sh": No such file or directory at /usr/local/nrdp/clients/nrds/nrds.pl line 91, <CONFIG> line 44.

Re: NRDS Client not downloading plugins

Posted: Fri Mar 04, 2016 2:27 pm
by lmiltchev
I have the cron to run the NRDS check running under the 'root' user currently.
I believe this cron job needs to be run by nagios user...

What is the output of the following command?

Code: Select all

crontab -u nagios -l
Also, go to Admin->NRDS Config Manager->Edit, change the path in the "PLUGIN_DIR" field from this:

Code: Select all

/usr/local/nagios/libexec
to:

Code: Select all

/usr/lib/nagios/plugins
and hit "Save".

Wait for the cron job to run twice, and check your service in XI.

Did this help?

Re: NRDS Client not downloading plugins

Posted: Fri Mar 04, 2016 2:30 pm
by tgriep
We replicated the issue and opened up a bug report to get it fixed.
NEW TASK ID 7941

For now, you will have to copy the plugin over manually.

Re: NRDS Client not downloading plugins

Posted: Fri Mar 04, 2016 2:47 pm
by derekb
tgriep wrote:We replicated the issue and opened up a bug report to get it fixed.
NEW TASK ID 7941

For now, you will have to copy the plugin over manually.
Yesssssss! I love finding bugs. Thanks guys. Look forwarding to seeing it in a new update. Manually copying is fine for now.

Re: NRDS Client not downloading plugins

Posted: Fri Mar 04, 2016 3:08 pm
by rkennedy
Thanks for understanding!

I'll leave this thread open for now, so that you can check back.

Re: NRDS Client not downloading plugins

Posted: Mon May 09, 2016 12:36 pm
by jomann
derekb,

The post that ludmil made on this page is the proper answer. I tested the NRDS setup you made and there's a few things to note that are required to make it work:

1. The plugin you are trying to copy should be in the libexec directory on Nagios XI or in one of the special directories for NRDS (you can skip finding the special directory by just leaving it in libexec)

2. The PLUGIN_DIR must match the location of where the plugin is going to be saved on the nrds client host

3. NRDS will copy the plugin from libexec to PLUGIN_DIR when it does the plugin sync and your checks will then work properly