testing by monitoring a few https host which created from /usr/local/nagios/etc/objects/https.cfg … and added parameter cfg_file=/usr/local/nagios/etc/objects/https.cfg into nagios.cfg. Work till here so far so good!
Problem starts HERE. trying to split the few host which defined in the https.cfg into afew different files,
eg. httpsCN.cfg, httpsSG.cfg, httpsUS.cfg and etc
Excluded the parameter cfg_file=/usr/local/nagios/etc/objects/https.cfg from nagios.cfg and included new parameter:
cfg_file=/usr/local/nagios/etc/objects/httpsCN.cfg
cfg_file=/usr/local/nagios/etc/objects/httpsSG.cfg
cfg_file=/usr/local/nagios/etc/objects/httpsUS.cfg
After that the nagios GUI @localhost/nagios wont refresh to new host. Instead it keep showing the old https.cfg even though that file isnt pointed in nagios.cfg and the physical file of https.cfg is deleted.
Tried “service nagios reload, restart, stop, start”. Tried restart Apache2, clear cache, restart computer. and it still persist with the old host and not the new 1.
Double checked that the cfg_file=/usr/local/nagios/etc/objects/httpsUS.cfg and etc parameter is correctly written.
try nagios stop, check that no nagios process is running (ps -ef | grep nagios) kill any survivors and restart. Should this fail… are you sure you are using the right server and config files? yes, this already happened, who knows
luca, thanks for your tips, however the problem still persist. i tried a fresh reinstall and it seems the problem occur after a certain while after the fresh install. Im wondering is it the caches or retention files causes it.
by the way i got another question which is, after i “service nagios reload” i found out that all my devices is in pending state and scheduled for checks but before the check happen, sometimes it declared that the device is in “DOWN” state already.
So i was wondering can i set something which can force nagios to check every single devices immediately(or near ASAP) after a reload or restart. Noted that the schedule for 1st check is about 4-5minutes after a reload/restart.
if i’m not mistaken there is an option which tells nagios how much time SHOULD pass before all checks have been executed for the first time. it is NOT recommended to use these options, leave them in “smart” mode.
Service and host state retention are used normally to avoid rechecking everything, see if you can reenable some of the retention options.
Firstly, ensure that the process is running Nagios and start to kill the family. If you are unsure that you use the right server and configuration files. I was wondering what may be compelled to review all equipment Nagios immediately or close ASAP after a reload or reboot. Noted that the timetable for the first review is about 4-5 minutes after charging .