This is the reason why I only use OMD installations at the moment and don’t want to install all by myself. If you need a core like Nagios 4 then try the OMD builds from Consol testing repo there is a package available with Naemon core and this is the “real” Nagios 4.
Setup a testing environment and try if this suits your needs.
Best regards
Andreas
···
Jason Magee jjtechtech@gmail.com schrieb am Di., 29. Dez. 2015, 22:41:
Finally got it fixed. Restored a previous version as a new name and copied the permissions. Thanks for all your help.
I am now getting emails however I don’t get the pnp4nagios graphs in the email. I get the following in the log though…
Output: Unable to fetch number of graphs: Unable to locate pnp4nagios index.php ()
Would you happen to know where this should be configured. I have already configured pnp4nagios and can see the graphs in Nagios and check_mk.
From: Andreas Döhler [mailto:andreas.doehler@gmail.com]
Sent: Tuesday, December 29, 2015 12:24 PM
To: Jason Magee jjtechtech@gmail.com; checkmk-en@lists.mathias-kettner.de
Subject: Re: FW: [Check_mk (english)] Notifications not working
And what do you see now inside the log files?
Any changes to before?
Jason Magee jjtechtech@gmail.com schrieb am Di., 29. Dez. 2015, 19:18:
Running cmk –notify as Nagios user does not return an error.
From: Andreas Döhler [mailto:andreas.doehler@gmail.com]
Sent: Tuesday, December 29, 2015 11:49 AM
To: Jason Magee jjtechtech@gmail.com; checkmk-en@lists.mathias-kettner.de
Subject: Re: FW: [Check_mk (english)] Notifications not working
Like i said before test with “check_mk --notify” if all is right this will give you no error.
Jason Magee jjtechtech@gmail.com schrieb am Di., 29. Dez. 2015, 17:55:
Is there a way to verify what settings/permissions they should be?
From: Andreas Döhler [mailto:andreas.doehler@gmail.com]
Sent: Tuesday, December 29, 2015 9:40 AM
To: Jason Magee jjtechtech@gmail.com; checkmk-en@lists.mathias-kettner.de
Subject: Re: FW: [Check_mk (english)] Notifications not working
Your error message says no
As I don’t see the settings I would say Nagios has no write access to the directory or the existing file has wrong permissions.
Jason Magee jjtechtech@gmail.com schrieb am Di., 29. Dez. 2015, 15:56:
Yes it is.
From: Andreas Döhler [mailto:andreas.doehler@gmail.com]
Sent: Monday, December 28, 2015 3:52 PM
To: Jason Magee jjtechtech@gmail.com; checkmk-en@lists.mathias-kettner.de
Subject: Re: FW: [Check_mk (english)] Notifications not working
Is the directory write able for your Nagios user?
Jason Magee jjtechtech@gmail.com schrieb am Mo., 28. Dez. 2015 um 19:55:
Aha.
I was running it as root
After switching to Nagios and running it, here are the results.
nagios@hq-nag-mon-01p:~$ cmk --notify
Traceback (most recent call last):
File “/usr/share/check_mk/modules/check_mk.py”, line 5722, in
sys.exit(do_notify(args))
File “/usr/share/check_mk/modules/notify.py”, line 195, in do_notify
file(crash_dir + "/crash.log", "a").write("CRASH (%s):\n%s\n" %
IOError: [Errno 13] Permission denied: ‘/var/lib/check_mk/notify/crash.log’
I looked at my entire notify directory and content and they all are
www-data:nagios
I am not sure what the permissions should be…
From: Andreas Döhler [mailto:andreas.doehler@gmail.com]
Sent: Monday, December 28, 2015 11:52 AM
To: Jason Magee jjtechtech@gmail.com; checkmk-en@lists.mathias-kettner.de
Subject: Re: FW: [Check_mk (english)] Notifications not working
I think it is no permission problem it must have something to do how the notification command is called. Normally you can have a look at the effective configuration inside your configuration cache file. I don’t know how this looks like on Nagios 4 but on 3 it was the easiest way to detect wrong configurations.
The command “check_mk --notify” was done with the user Nagios is running?
Best regards
Andreas
Jason Magee jjtechtech@gmail.com schrieb am Mo., 28. Dez. 2015, 18:27:
Thanks for your help Andreas.
The problem is that I have not really seen a good Installation doc for the newest versions of Nagios, pnp4nagios, check_mk and nagvis. It should not be that complicated but it is turning out to be a real bear…
From: Andreas Döhler [mailto:andreas.doehler@gmail.com]
Sent: Monday, December 28, 2015 11:11 AM
To: Jason Magee jjtechtech@gmail.com; checkmk-en@lists.mathias-kettner.de
Subject: Re: FW: [Check_mk (english)] Notifications not working
If you get no error messages and nothing else it could be easier to make a clean installation and only move your historic data. But I don’t know how complex your setup is.
Jason Magee jjtechtech@gmail.com schrieb am Mo., 28. Dez. 2015, 17:54:
The only thing that changed were permissions on some files. The problem is that I am not sure what I changed…
From: Andreas Döhler [mailto:andreas.doehler@gmail.com]
Sent: Monday, December 28, 2015 10:32 AM
To: Jason Magee jjtechtech@gmail.com; checkmk-en@lists.mathias-kettner.de
Subject: Re: FW: [Check_mk (english)] Notifications not working
The output of your notify.log looks good until 22.12. there was something changed that only 18 variables submitted after that change. Now with only 0 variables there is some more going wrong. Inside your Nagios.log you can check what config files all are loaded. Now the question what was done before the 22.12.?
Jason Magee jjtechtech@gmail.com schrieb am Mo., 28. Dez. 2015 um 16:52:
Here is the Nagios.cfg.
Thanks,
Jason
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en