|
Why do all files write to /usr/local/nagios/etc ? 2 Years, 1 Month ago
|
Karma: 0
|
|
For Nagios 3, the default installation path is:
/usr/local/nagios/
Whereas my nagios.cfg is stored where it's supposed to be
(/usr/local/nagios/etc/), as it is specified in my nagiosQL settings.ini file:
[nagios]
; Nagios main configuration directory
; -----------------------------------
config = "/usr/local/nagios/etc/"
; Nagios host configuration directory
; -----------------------------------
confighosts = "/usr/local/nagios/etc/objects/NagiosQL/hosts/"
; Nagios service settings directory
; ---------------------------------
configservices = "/usr/local/nagios/etc/objects/NagiosQL/services/"
; Backup directories
; ------------------
backup = "/usr/local/nagios/etc/backup/"
backuphosts = "/usr/local/nagios/etc/backup/hosts/"
backupservices = "/usr/local/nagios/etc/backup/services/"
But when I select "Write all monitoring configurations:" or "Write all additional configurations" from the nagiosQL > Tools> Nagios control page, all of the configs write to " /usr/local/nagios/etc " even though the correct directory structure is specified in the Nagios.cfg file:
# You can specify individual object config files as shown below:
cfg_file=/usr/local/nagios/etc/objects/commands.cfg
cfg_file=/usr/local/nagios/etc/objects/contacts.cfg
cfg_file=/usr/local/nagios/etc/objects/timeperiods.cfg
cfg_file=/usr/local/nagios/etc/objects/templates.cfg
# SPECIAL OBJECT FILES REQUIRED BY NAGIOSQL
cfg_file=/usr/local/nagios/etc/objects/NagiosQL/contactgroups.cfg
#cfg_file=/usr/local/nagios/etc/objects/contacts.cfg ## ALREADY PLACED BY NAGIOS
#cfg_file=/usr/local/nagios/etc/objects/timeperiods.cfg ## ALREADY PLACED BY NAGIOS
cfg_file=/usr/local/nagios/etc/objects/NagiosQL/hostgroups.cfg
cfg_file=/usr/local/nagios/etc/objects/NagiosQL/servicegroups.cfg
#cfg_file=/usr/local/nagios/etc/objects/NagiosQL/servicedependencies.cfg
#cfg_file=/usr/local/nagios/etc/objects/NagiosQL/serviceescalations.cfg
#cfg_file=/usr/local/nagios/etc/objects/NagiosQL/hostdependencies.cfg
#cfg_file=/usr/local/nagios/etc/objects/NagiosQL/hostescalations.cfg
#cfg_file=/usr/local/nagios/etc/objects/NagiosQL/hostextinfo.cfg
#cfg_file=/usr/local/nagios/etc/objects/NagiosQL/serviceextinfo.cfg
cfg_dir=/usr/local/nagios/etc/objects/NagiosQL/hosts
cfg_dir=/usr/local/nagios/etc/objects/NagiosQL/services
Is there someway I can make the config files write to the correct locations?
(BTW - the backup files write to the correct location)
Thanks for all your help!
|
|
|
|
|
|
|
Re:Why do all files write to /usr/local/nagios/etc 2 Years, 1 Month ago
|
Karma: 5
|
|
NagiosQL does not read the nagios.cfg file. The paths are set by settings.ini.
Look at:
config = "/usr/local/nagios/etc/"
and change them to your desired configuration file path.
|
|
martin
NagiosQL Founder
Posts: 309
|
|
|
|
|
Re:Why do all files write to /usr/local/nagios/etc 2 Years, 1 Month ago
|
Karma: 0
|
|
Right, the only problem with that solution is that then the "nagios.cfg" file has to be moved as well... No worries.... I'll keep it as is.... maybe in a future release you guys could add a variable in the settings.ini file for where you can define a new path, just for your cfg files (checkcommands, misccommands, etc) along with the current variable > "Nagios main configuration directory" is for nagios.cfg path definition.
Thanks for the response, I'm loving NagiosQL.
|
|
|
|
|
|
|