Cannot remove "winserver" from Host Detail
Posted: Mon Jun 15, 2015 7:37 am
I am having an issue after installing Core 4 on Ubuntu 15.x.
I followed the install guide by Unixmen (http://www.unixmen.com/install-configur ... 4-1014-04/). I have all of my windows server config files under the /usr/local/nagios/etc/objects, each in their own CFG file; and added the path of each CFG file to /usr/local/nagios/etc/nagios.cfg; everything is working great.
The issue I have is that I have one extra server named winserv hanging out in my server list on the Host Detail page. I know where it is coming from, but I cannot figure out how to remove it. This is coming from the windows.cfg file inside the objects folder where all my other config files are, but if I remove this file and remove the line entry from nagios.cfg, the nagios service fails to start up. Here is the contents of the file:
define host{
use windows-server ; Inherit default values from a template
host_name winserver ; The name we're giving to this host
alias My Windows Server ; A longer name associated with the host
address xxx.xxx.xxx.xxx ; IP address of the host
}
define hostgroup{
hostgroup_name windows-servers ; The name of the hostgroup
alias Windows Servers ; Long name of the group
}
define service{
use generic-service
host_name winserver
service_description NSClient++ Version
check_command check_nt!CLIENTVERSION
}
I have commented out everything that I can without the service crashing, but I cannot get this machine off the monitoring page. I don't want to monitor the NSClient++ service, nor do I even want this machine on the monitoring page. Here is the verbose output from the sudo /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg test:
Nagios Core 4.1.0rc1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 02-18-2015
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Error: Invalid max_check_attempts value for host 'xxxxxxxxx'
Error: Could not register host (config file '/usr/local/nagios/etc/objects/xxxxxxxxxx.cfg', starting on line 4)
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.
administrator@Nagios:/usr/local/nagios/etc/objects$
I think this windows.cfg file is a template for other parts of Nagios Core 4 but I am not sure. How can I remove this entry?
I followed the install guide by Unixmen (http://www.unixmen.com/install-configur ... 4-1014-04/). I have all of my windows server config files under the /usr/local/nagios/etc/objects, each in their own CFG file; and added the path of each CFG file to /usr/local/nagios/etc/nagios.cfg; everything is working great.
The issue I have is that I have one extra server named winserv hanging out in my server list on the Host Detail page. I know where it is coming from, but I cannot figure out how to remove it. This is coming from the windows.cfg file inside the objects folder where all my other config files are, but if I remove this file and remove the line entry from nagios.cfg, the nagios service fails to start up. Here is the contents of the file:
define host{
use windows-server ; Inherit default values from a template
host_name winserver ; The name we're giving to this host
alias My Windows Server ; A longer name associated with the host
address xxx.xxx.xxx.xxx ; IP address of the host
}
define hostgroup{
hostgroup_name windows-servers ; The name of the hostgroup
alias Windows Servers ; Long name of the group
}
define service{
use generic-service
host_name winserver
service_description NSClient++ Version
check_command check_nt!CLIENTVERSION
}
I have commented out everything that I can without the service crashing, but I cannot get this machine off the monitoring page. I don't want to monitor the NSClient++ service, nor do I even want this machine on the monitoring page. Here is the verbose output from the sudo /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg test:
Nagios Core 4.1.0rc1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 02-18-2015
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Error: Invalid max_check_attempts value for host 'xxxxxxxxx'
Error: Could not register host (config file '/usr/local/nagios/etc/objects/xxxxxxxxxx.cfg', starting on line 4)
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.
administrator@Nagios:/usr/local/nagios/etc/objects$
I think this windows.cfg file is a template for other parts of Nagios Core 4 but I am not sure. How can I remove this entry?