amakorju wrote:After i try to apply configuration (which won't work), it generates a duplicate nagios.cfg (.swp), timeperiods.cfg (swp) and commands.cfg (swp) in the /usr/local/nagios/etc folder.
Do you happen to have these files open on another terminal?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
This is the error it gives after backing up and removing the timeperiods.cfg file
Error: Cannot open config file '/usr/local/nagios/etc/timeperiods.cfg' for reading: No such file or directory
Error processing object config files!
***> One or more problems was encountered while processing the config files...
Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
You must have performed an extra operation, like removing a file and commenting out the timeperiod in question. Return the file to its original location and rerun the "write" and "verify" steps. Post the output of those steps in code wraps. DO NOT a"apply configuration" or "restart" nagios just yet, as if the apply fails, the old config will be once again written back to disk.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.