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.
ssax
Dreams In Code
Posts: 7682 Joined: Wed Feb 11, 2015 12:54 pm
Post
by ssax » Thu Mar 19, 2015 11:39 am
Ok, I talked with a dev and I think we might know what's happening.
We think that your apache user does not have access to that checkresults directory most likely because of a parent folders permissions.
http://php.net/manual/en/function.tempnam.php
If the directory does not exist, tempnam() may generate a file in the system's temporary directory
Please post the output of the following:
Code: Select all
grep apache /etc/group
ls -ld /usr/local/nagios/var/spool/checkresults
ls -ld /usr/local/nagios/var/spool
ls -ld /usr/local/nagios/var
ls -ld /usr/local/nagios
tacchino
Posts: 18 Joined: Mon Mar 16, 2015 12:29 pm
Post
by tacchino » Thu Mar 19, 2015 12:20 pm
grep apache /etc/group
apache
48:
ls -ld /usr/local/nagios/var/spool/checkresults
drwxrwxr-x 2 nagios nagios 4096 Mar 19 11:53 /usr/local/nagios/var/spool/checkresults
ls -ld /usr/local/nagios/var/spool
drwxrwxr-x 3 nagios nagios 4096 Nov 25 2013 /usr/local/nagios/var/spool
ls -ld /usr/local/nagios/var
drwxrwxr-x 7 nagios nagios 4096 Mar 19 13:14 /usr/local/nagios/var
ls -ld /usr/local/nagios
drwxrwxr-x 9 nagios nagios 4096 Mar 17 11:24 /usr/local/nagios
also
id apache
uid=48(apache) gid=58637(nagios) groups=58637(nagios)
ssax
Dreams In Code
Posts: 7682 Joined: Wed Feb 11, 2015 12:54 pm
Post
by ssax » Thu Mar 19, 2015 12:35 pm
Please try running the command below and try again:
tacchino
Posts: 18 Joined: Mon Mar 16, 2015 12:29 pm
Post
by tacchino » Thu Mar 19, 2015 12:43 pm
OK, I really don't understand the result from 'id' differing from /etc/group but doing a usermod does get group looking right
Code: Select all
grep apache /etc/group
apache:x:48:
nagios:x:58637:nagios,apache
Still ending up in /tmp however. Looking at other files now
tacchino
Posts: 18 Joined: Mon Mar 16, 2015 12:29 pm
Post
by tacchino » Thu Mar 19, 2015 1:00 pm
OK, progress. Restarted apache and got files to no longer write to /tmp. The Host check is going through, the service check so far is not.
tacchino
Posts: 18 Joined: Mon Mar 16, 2015 12:29 pm
Post
by tacchino » Thu Mar 19, 2015 1:19 pm
OK, I think we're officially past the /tmp problem. Do see host checks going through as expected, service check I think are running in to this bug:
http://sourceforge.net/p/nagios/nagiosc ... 1f1d5fd9c/ . This install is 4.0.2, I suppose I need to upgrade?
[1426787782] PASSIVE SERVICE CHECK: nrdp-core-centos-65;chef-client;2;(Service check timed out after 0.00 seconds)
[1426787782] PASSIVE HOST CHECK: nrdp-core-centos-65;0;Everything looks okay!
ssax
Dreams In Code
Posts: 7682 Joined: Wed Feb 11, 2015 12:54 pm
Post
by ssax » Thu Mar 19, 2015 2:02 pm
Yes, you would need to upgrade to get rid of that error.
tacchino
Posts: 18 Joined: Mon Mar 16, 2015 12:29 pm
Post
by tacchino » Thu Mar 19, 2015 2:24 pm
Cool, I'll work on that. Thanks for all your help!
ssax
Dreams In Code
Posts: 7682 Joined: Wed Feb 11, 2015 12:54 pm
Post
by ssax » Thu Mar 19, 2015 2:47 pm
No problem, is it ok if I mark this thread as resolved and lock the topic? You can create a new one if you have any issues on the upgrade.
tacchino
Posts: 18 Joined: Mon Mar 16, 2015 12:29 pm
Post
by tacchino » Thu Mar 19, 2015 3:15 pm
Yep, no problem. Thanks again.