nrpe.cfg reconfig?

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: nrpe.cfg reconfig?

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
xpac
Posts: 54
Joined: Mon Aug 25, 2014 3:43 pm

Re: nrpe.cfg reconfig?

Post 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!
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: nrpe.cfg reconfig?

Post by ssax »

That's great to hear! I will be marking this as resolved and locking the topic.
Locked