windows.cfg file edits causes nagios service to fail
Posted: Thu Jun 11, 2015 3:10 pm
Pulling my hair out. Every single time I make the slightest edit to the windows.cfg file, the nagios service fails to start. I can't figure out why. Even doing some as simple as changing the host_name from the default winserver to something like winserver2 (only adding a 2 to the end) causes the nagios service to fail on reload.
The error is generic and states that it may be an issue with the config file. Nothing in the nagios log that tells me what exactly is going on.
I am using vi to edit /usr/local/nagios/etc/objects/windows.cfg. I have also tried nano for the editor and same results. It seems like the slightest change I make to the file (not adding spaces or line breaks) causes the service to fail on reload. Even if I change the edit immediately back to how the file was originally configured, the service still fails. The only way to recover is to restore the windows.cfg file from a backup.
I have tried changing the path to a different location. i have tried using a different config file for my windows servers, even going so far as to start with a blank config file and copying in the host definition from the sample into that blank file. Still the service errors on restart with a generic config file error message.
Doesn't make sense. I am extremely careful to main the exact syntax required. Is this a bug because I am using CentOS 7. It is the only thing I have running on this server and the nagios admin website comes up fine. Should I just switch to ubuntu?
The error is generic and states that it may be an issue with the config file. Nothing in the nagios log that tells me what exactly is going on.
I am using vi to edit /usr/local/nagios/etc/objects/windows.cfg. I have also tried nano for the editor and same results. It seems like the slightest change I make to the file (not adding spaces or line breaks) causes the service to fail on reload. Even if I change the edit immediately back to how the file was originally configured, the service still fails. The only way to recover is to restore the windows.cfg file from a backup.
I have tried changing the path to a different location. i have tried using a different config file for my windows servers, even going so far as to start with a blank config file and copying in the host definition from the sample into that blank file. Still the service errors on restart with a generic config file error message.
Doesn't make sense. I am extremely careful to main the exact syntax required. Is this a bug because I am using CentOS 7. It is the only thing I have running on this server and the nagios admin website comes up fine. Should I just switch to ubuntu?