net-mgmt/nagios-devel cgi_dir recursive feature
chris at sigd.net
Thu Dec 27 17:30:20 PST 2007
Looking here at:
It shows that if you had been using cgi_dir for several subdirectories,
there would be several cfgs getting loaded into Nagios during the
Even it would pass the nagios -v with flying colors.
In my situation, it was not working. I am using FreeBSD 6.2 with
the nagios-devel installed from ports as of this morning (RC1). My
nagios system is set up as a distributed nagios system with a single
master server and slaves that are sharing the same cfg files.
My problem laid in the use of recursive part of the cgi_dir.
For example, in the nagios.cfg for the master nagios server, I
have those lines:
The directory structure is like this:
In each of those directories, there are several .cfg
files. Only the templates-related cfgs are in the slave's
parent directory (svchosts.$SLAVE_NAME/). The services
and host defined directives are in those cfgs that are
located in any of those three categorized directories under
the slave's parent directory.
Testings were done to make sure the . (period) was not the
culprit in the nagios.cfg. I tried dashes and without any
special characters. I used absolute paths too.
Nagios always failed with no services or hosts found.
If I added those lines to the nagios.cfg:
Nagios would start up with no errors.
It is like the cfg_dir does not have the recursive feature
as it is shown in their documentation.
I have emailed the nagios-users@ mailing list and got only
one person to confirm that it is working as expected. He
pasted his example and because of his path to the nagios
directory being /usr/local/nagios/etc, it gave me the clue
that it is a Linux machine running nagios.
I am wondering that if there is any other FreeBSD users
that are using nagios successfully using the cfg_dir
recursive feature? If so, could I see few samples or
would you share any insights in how you got it working. Or
are there any known issues related to the recursive feature?
Even I had the debug turned on, it does not show when
it is loading cfg files or how it is working on doing that.
More information about the freebsd-ports