Load all configs in a directory

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.
Locked
amprantino
Posts: 140
Joined: Thu Apr 18, 2013 8:25 am
Location: libexec

Load all configs in a directory

Post by amprantino »

Hello all,

is it possible to load all cfg files under a directory?

The obvious addition in nagios.cfg is not working:
cfg_file=/etc/nagios/objects/hostextinfo/*.cfg

Any workaround?

Thank you
alex.mullen
Posts: 2
Joined: Fri Sep 18, 2015 10:58 am

Re: Load all configs in a directory

Post by alex.mullen »

Hi,

You should change cfg_file to cfg_dir

cfg_dir=/etc/nagios/objects/hostextinfo/
alex.mullen
Posts: 2
Joined: Fri Sep 18, 2015 10:58 am

Re: Load all configs in a directory

Post by alex.mullen »

Hi,

You should change cfg_file to cfg_dir

cfg_dir=/etc/nagios/objects/hostextinfo/
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Load all configs in a directory

Post by hsmith »

@amprantino, did that solve your issue or is there something we can do to further help with this?

Thanks @alex.mullen!
Former Nagios Employee.
me.
amprantino
Posts: 140
Joined: Thu Apr 18, 2013 8:25 am
Location: libexec

Re: Load all configs in a directory

Post by amprantino »

Everything OK!!

Thank you
Locked