NRDP is not updating Nagios

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
matts
Posts: 5
Joined: Fri Aug 30, 2013 3:49 pm

NRDP is not updating Nagios

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NRDP is not updating Nagios

Post by scottwilkerson »

Try changing permissions on /var/lib/nagios3/spool/checkresults/

to

Code: Select all

drwxrwx--- 2 nagios nagios 
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
matts
Posts: 5
Joined: Fri Aug 30, 2013 3:49 pm

Re: NRDP is not updating Nagios

Post 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.
matts
Posts: 5
Joined: Fri Aug 30, 2013 3:49 pm

Re: NRDP is not updating Nagios

Post 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.
matts
Posts: 5
Joined: Fri Aug 30, 2013 3:49 pm

Re: NRDP is not updating Nagios

Post 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!
Locked