Page 1 of 1

NRDP is not updating Nagios

Posted: Tue Sep 03, 2013 10:48 am
by matts
Hello,

I am running Debian 7, with Nagios installed via the packages. I am using vshell as well as nconf. Passive checks are working successfully with NSCA and NRPE.

I have followed the guide for the NRDP installation based on the PDF and even took note of the debian specific permissions changes as noted in the nagios.cfg file for enabling external commands.

So, In short. I am able to get to the admin page.. I am able to submit a check with the following results:

Code: Select all

<result>
<status>0</status>
<message>OK</message>
<meta>
<output>1 checks processed.</output>
</meta>
</result>
However, nothing happens (aside from normal checks appearing) when watching the nagios log. No errors in the apache error log.

Here is the crazy part, the .ok and the check results are being dropped in /tmp NOT in the specified folder in the config and I have no idea why!

Admittedly, I have made so many changes and followed so many guides I am not sure where to go from here.. I tried a variety of combinations in paths and groups etc. with no change.

Any help would be appreciated.

Thanks!

Matt

------------------------------------------------------------

This is my config file.

Code: Select all

$cfg["nagios_command_group"]="www-data";

$cfg["command_file"]="/var/lib/nagios3/rw/nagios.cmd";

$cfg["check_results_dir"]="/var/lib/nagios3/spool/checkresults/";

$cfg["tmp_dir"]="/usr/local/nrdp/var/tmp/";

///////// DONT MODIFY ANYTHING BELOW THIS LINE /////////

$cfg['product_name']='nrdp';
$cfg['product_version']='1.0'
Here are the permissions of /var/lib/nagios3 :

Code: Select all

drwxr-x--x  4 nagios nagios   4.0K Sep  3 15:06 .
drwxr-xr-x 25 root   root     4.0K Sep  3 12:28 ..
-rw-------  1 nagios www-data  58K Sep  3 15:06 retention.dat
drwx--s---  2 nagios www-data 4.0K Sep  3 14:11 rw
drwxr-x---  3 nagios nagios   4.0K Aug 16 14:51 spool

-- INSIDE OF RW --

drwx--s--- 2 nagios www-data 4.0K Sep  3 14:11 .
drwxr-x--x 4 nagios nagios   4.0K Sep  3 15:06 ..
prw-rw---- 1 nagios www-data    0 Sep  3 15:35 nagios.cmd

-- INSIDE OF SPOOL --

drwxr-x--- 3 nagios nagios 4.0K Aug 16 14:51 .
drwxr-x--x 4 nagios nagios 4.0K Sep  3 15:06 ..
drwxr-x--- 2 nagios nagios 4.0K Sep  3 15:40 checkresults

-- TEMP DIR --

ls -alh /usr/local/nrdp/var/tmp/
total 8.0K
drwxrwsrwx 2 nagios nagios 4.0K Aug 30 20:44 .
drwxrwsrwx 3 nagios nagios 4.0K Aug 30 19:39 ..
-- GROUPS -- (I added nagcmd out of chance it would fix it)

Code: Select all

nagios:x:105:www-data,nagios
nagcmd:x:1001:www-data,nagios

Re: NRDP is not updating Nagios

Posted: Tue Sep 03, 2013 10:22 pm
by scottwilkerson
Try changing permissions on /var/lib/nagios3/spool/checkresults/

to

Code: Select all

drwxrwx--- 2 nagios nagios 

Re: NRDP is not updating Nagios

Posted: Wed Sep 04, 2013 10:19 am
by matts
Thanks for the input Scott.

Unfortunately, that did not change anything. My .ok files are still being dropped in the /tmp folder regardless of what I put in the config.

Also, when monitoring the nagios.log via "tail -f" I don't see any passive checks submitted like I do for NSCA checks.

Re: NRDP is not updating Nagios

Posted: Wed Sep 04, 2013 10:24 am
by matts
I stand corrected. Those were old files in /tmp

Now I DON'T get any .ok files in /tmp or the one mentioned in my config.

Re: NRDP is not updating Nagios

Posted: Wed Sep 04, 2013 10:38 am
by matts
SOLVED - It was the permissions as noted by Scott

I realized files were being dropped into the checkresults folder now (that's why they weren't in any temp folder).

Once I saw the files not being processed since they were as "www-data" had to set the user in the config, back to "nagios"

Reloaded apache as the settings didn't take for some reason and then boom!

Thanks!