linux_driver
linux_driver

Reputation: 37

Correct way to add modified check-command for Nagios

I am running Nagios® Core Version 3.5.1 on Ubuntu 14.04.5 LTS. I am adding a slightly different check_http defined as check_http_s. It appears that I can add this to any one of three different files:

a.  /etc/nagios3/conf.d/checkcommands.cfg
b.  /etc/nagios3/global/checkcommands.cfg
c.  /etc/nagios-plugins/config/http.cfg

But it turns out, that Nagios cannot find the new check command unless it is in C - /etc/nagios-plugins/config/http.cfg

Is this OK? What are Files A&B for because it appears to me that they are not being used by Nagios in my case.

Thanks in advance for any guidance.

Upvotes: 0

Views: 357

Answers (1)

Nagios Support
Nagios Support

Reputation: 561

Configuration files are all included from the main nagios.cfg. They are included with the following directives:

cfg_file=

cfg_dir=

So, unfortunately, there isn't any good way to just tell if files are in use - you need to travel down the path of which files are included, and then see if files are included from those files!

cd /path/to/root/nagios/dir
grep -R "cfg_file\|cfg_dir" *

Hope this helps!

Upvotes: 1

Related Questions