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.
t3dus
Posts: 161 Joined: Thu Feb 04, 2016 3:46 pm
Location: IA
Contact:
Post
by t3dus » Mon Sep 11, 2017 8:25 pm
I'm having a problem after a fresh reinstal of nagios where the command below results in an error. I'm not sure how to fix it.
Code: Select all
# service nagios checkconfig
Running configuration check...
ERROR: Could not create or update '/usr/local/nagios/var/nagios.configtest'
but if I do
Code: Select all
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
it works fine.
Clearly I like the shorter method of using "service nagios checkconfig" better than trying to remember that 2nd line above. How do I resolve this?
scottwilkerson
DevOps Engineer
Posts: 19396 Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:
Post
by scottwilkerson » Tue Sep 12, 2017 7:39 am
There is a but in 4.3.4 that has been identified by a few other users with this same issue.
Our developers are working on a fix for the next release.
t3dus
Posts: 161 Joined: Thu Feb 04, 2016 3:46 pm
Location: IA
Contact:
Post
by t3dus » Tue Sep 12, 2017 7:44 am
Is there a way I can at least make
Code: Select all
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
into something more remember-able?
t3dus
Posts: 161 Joined: Thu Feb 04, 2016 3:46 pm
Location: IA
Contact:
Post
by t3dus » Tue Sep 12, 2017 7:48 am
NM i figured out a work around.. This is what I did..
On your home folder (you could also do this in the root folder):
Enter the command for nagios checkconfig:
Code: Select all
alias nagioscheckconfig='/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg'
After saving the file reconfigure your bashrc
And check your new alias is loaded
That's it, you can check config by typing
Last edited by
t3dus on Tue Sep 12, 2017 12:28 pm, edited 1 time in total.
scottwilkerson
DevOps Engineer
Posts: 19396 Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:
Post
by scottwilkerson » Tue Sep 12, 2017 9:00 am
t3dus wrote: NM i figured out a work around.. This is what I did..
Thanks for sharing the technique!
t3dus
Posts: 161 Joined: Thu Feb 04, 2016 3:46 pm
Location: IA
Contact:
Post
by t3dus » Tue Sep 12, 2017 12:29 pm
scottwilkerson wrote: Thanks for sharing the technique!
No problem. I just can't ever remember that long check method so I had to come up with a work around.
I'm sure others might have the same issue.