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.
Nagios Host has 3 services even though .cfg specifies none
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Nagios Host has 3 services even though .cfg specifies no
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
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
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 thatscottwilkerson 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
Re: Nagios Host has 3 services even though .cfg specifies no
I did some more digging and saw that other hosts are in the same hostgroup but do not have any servicesJBashir wrote: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 thatscottwilkerson 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
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Nagios Host has 3 services even though .cfg specifies no
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
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!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?
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Nagios Host has 3 services even though .cfg specifies no
Great! Glad it is resolvedJBashir wrote: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!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?
Locking thread