Page 1 of 1
Nagios Host has 3 services even though .cfg specifies none
Posted: Thu Oct 17, 2019 2:43 pm
by JBashir
Hi im having a strange issue where my nagios is monitoring 3 services on a host with no services specified in the cfg file.
I have tried deleting and recreating the .cfg file from scratch yet this issue persists no matter what i change. Any ideas or help would be greatly appreciated.
Re: Nagios Host has 3 services even though .cfg specifies no
Posted: Thu Oct 17, 2019 3:12 pm
by scottwilkerson
This can happen if you have the host assigned to a hostgroup AND you have that hostgroup attached to service definitions.
When you attach hostgroups to service definitions ALL of the hosts in the hostgroup get those services added
Re: Nagios Host has 3 services even though .cfg specifies no
Posted: Thu Oct 17, 2019 4:17 pm
by JBashir
scottwilkerson wrote:This can happen if you have the host assigned to a hostgroup AND you have that hostgroup attached to service definitions.
When you attach hostgroups to service definitions ALL of the hosts in the hostgroup get those services added
I looked and im not seeing where my hostgroups are defined im reading that there should be a hostgroups.cfg in nagios/etc but mine doesnt appear to have that
Re: Nagios Host has 3 services even though .cfg specifies no
Posted: Thu Oct 17, 2019 4:35 pm
by JBashir
JBashir wrote:scottwilkerson wrote:This can happen if you have the host assigned to a hostgroup AND you have that hostgroup attached to service definitions.
When you attach hostgroups to service definitions ALL of the hosts in the hostgroup get those services added
I looked and im not seeing where my hostgroups are defined im reading that there should be a hostgroups.cfg in nagios/etc but mine doesnt appear to have that
I did some more digging and saw that other hosts are in the same hostgroup but do not have any services
Re: Nagios Host has 3 services even though .cfg specifies no
Posted: Thu Oct 17, 2019 4:45 pm
by scottwilkerson
Can you grep your config directory for the service name to find all the locations it is defined and look at those service definitions?
Re: Nagios Host has 3 services even though .cfg specifies no
Posted: Thu Oct 17, 2019 5:09 pm
by JBashir
scottwilkerson wrote:Can you grep your config directory for the service name to find all the locations it is defined and look at those service definitions?
ah thank you i did that and found it sitting in another cfg file (for another random host) that defined it and when i took it out of there my error disappeared thank you very much!
Re: Nagios Host has 3 services even though .cfg specifies no
Posted: Fri Oct 18, 2019 7:43 am
by scottwilkerson
JBashir wrote:scottwilkerson wrote:Can you grep your config directory for the service name to find all the locations it is defined and look at those service definitions?
ah thank you i did that and found it sitting in another cfg file (for another random host) that defined it and when i took it out of there my error disappeared thank you very much!
Great! Glad it is resolved
Locking thread