Page 3 of 3

Re: nrpe.cfg reconfig?

Posted: Mon Apr 13, 2015 6:33 pm
by Box293
xpac wrote:I think I'll have to take a look at the plugin/s themselves next as you suggested. The problem definitely lies with NRPE and/or the plugin itself - as I mentioned earlier when I run the command via NRPE it IMMEDIATELY returns the incorrect value, the Cassandra command at the very minimum requires 4-5 seconds to run locally and produce the output (more if there is a problem or the Cassandra cluster is under a heavy workload), so there is no way the command is being properly executed.
Good idea. Another common problem is that other executables used by the plugin might not directly point to the files. Like top instead of /usr/bin/top which can cause problems is the path environment was not loaded.

Re: nrpe.cfg reconfig?

Posted: Thu Apr 30, 2015 2:07 pm
by xpac
WOOHOO got it working!!! :lol:
Box293 wrote:path environment was not loaded
BINGO! I had kinda abandoned/forgotten about this for a while, but this morning I was troubleshooting a cron job that wouldn't run on Cassandra when I realized the issue was that it didn't have the necessary environment set to successfully run the job, even though the cron job was created with a user account that did have the permissions.

So I thought I'd see if that was causing the problems with the nagios plugin. Basically I just added the following line to the plugin script:

. $HOME/bash_profile

and VOILA it works :D :D

Thanks everyone!

Re: nrpe.cfg reconfig?

Posted: Thu Apr 30, 2015 2:09 pm
by ssax
That's great to hear! I will be marking this as resolved and locking the topic.