I always follow these steps:
- Add or change files in /usr/local/nagios/etc directories directly
- When I finish, I go across "Web UI" to "Verify Configuration", and so I verify no errors.
- After I go "Restart Nagios" and Web UI show me the changes has been done.
But now after the last step "- After I go "Restart Nagios" and Web UI show me the changes has been done." Nagios not show me the changes.
In "Configure" --> "Core Config Manager" "Services" there aren't things changed.
I try to fix this problem doing run "Apply Configuration", but has been worst. Nagios has deleted a lot of files !!
Before I run "Apply Configuration"
Code: Select all
[root@nagiosxi services]# pwd
/usr/local/nagios/etc/services
[root@nagiosxi services]# ll | wc -l
241
Nagios Core 4.1.1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-19-2015
License: GPL
Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Read object config files okay...
Running pre-flight check on configuration data...
Checking objects...
Checked 1805 services.
Checked 584 hosts.
Checked 72 host groups.
Checked 13 service groups.
Checked 21 contacts.
Checked 7 contact groups.
Checked 275 commands.
Checked 25 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 584 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 25 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 0
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight checkI run Apply Configuration:
Code: Select all
Write host configurations ...
WARNING! Ghost host config detected! Removing the file XXXXXX.cfg
WARNING! Ghost host config detected! Removing the file XXXXXX.cfg
WARNING! Ghost host config detected! Removing the file XXXXXX.cfg
WARNING! Ghost host config detected! Removing the file XXXXXX.cfg
Host configuration files successfully written!
Write service configurations ...
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
WARNING! Ghost service config detected! Removing the file XXXXXX.cfg
Service configuration files successfully written!
Configuration file: hostgroups.cfg successfully written!
Configuration file: servicegroups.cfg successfully written!
Configuration file: hosttemplates.cfg successfully written!
Configuration file: servicetemplates.cfg successfully written!
Configuration file: timeperiods.cfg successfully written!
Configuration file: commands.cfg successfully written!
Configuration file: contacts.cfg successfully written!
Configuration file: contactgroups.cfg successfully written!
Configuration file: contacttemplates.cfg successfully written!
Configuration file: servicedependencies.cfg successfully written!
Configuration file: hostdependencies.cfg successfully written!
Configuration file: serviceescalations.cfg successfully written!
Configuration file: hostescalations.cfg successfully written!
Configuration file: serviceextinfo.cfg successfully written!
Configuration file: hostextinfo.cfg successfully written!Code: Select all
[root@nagiosxi services]# pwd
/usr/local/nagios/etc/services
[root@nagiosxi services]# ll | wc -l
164
Code: Select all
Nagios Core 4.1.1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-19-2015
License: GPL
Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Read object config files okay...
Running pre-flight check on configuration data...
Checking objects...
Checked 1235 services.
Checked 580 hosts.
Checked 72 host groups.
Checked 13 service groups.
Checked 21 contacts.
Checked 7 contact groups.
Checked 274 commands.
Checked 25 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 580 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 25 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 0
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check- Why Nagios has deleted my files?
- I have a backup of my "1805 services", "584 hosts" and "275 commands" CFG files. How can I "apply" the modified configuration in /usr/local/nagios/etc and apply to "Nagios UI"?