nrdp config file

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.
Locked
User avatar
jssingh
Posts: 110
Joined: Mon Apr 29, 2013 4:55 pm

nrdp config file

Post by jssingh »

May I request you change the comments in the nrdp config file? This is what is currently in there:

Code: Select all

// full path to check results spool directory
$cfg["check_results_dir"]="/usr/local/nagios/var/spool/checkresults";

// full path to directory where temp scratch files can be written
// NOTE: the Apache user need to be able create files here, and the Nagios user needs to read/delete those same files, so the /tmp system directory won't work (it has a sticky bit on it)
$cfg["tmp_dir"]="/usr/local/nagios/var/tmp";
I had set up /usr/local/nagios/var/tmp with the correct permissions and it still was writing to /tmp. I remembered that I had this issue before, so I checked the forums and found my post and it looked like the problem just miraculously fixed itself, which wasn't helpful, so I looked at the code. $cfg["tmp_dir"] is not used anywhere. It is trying to write to $cfg["check_results_dir"]. It turns out I had to set the setuid bit on the permissions.

You should probably get rid of the tmp_dir line altogether because it is not used and therefore it is confusing that it is in there. But at the very least you should move the NOTE comment to the correct variable.

thanks!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: nrdp config file

Post by tmcdonald »

Thanks for the tip!

I vaguely remembered something weird with NRDP and directories, but never bothered to document it. I'll add this to our Github Issues tracker for NRPD: https://github.com/NagiosEnterprises/nrdp

Update: Posted https://github.com/NagiosEnterprises/nrdp/issues/5

Closing thread now, thanks again!
Former Nagios employee
Locked