I attempted to import a service check with the following code:
define service {
service_description Process - NTP
use app-service
hostgroup_name *,!Infra
check_command check_nrpe!check_ntp_proc!!!!!!!
parents alive
}
The import ran successfuly, but when I check in the GUI there are no hostgroups assigned to the check, although the check is active.
I tried to do it manually, and while I can add the !Infra, the * doesnt apply. Whe I try * on its own, I get an error about
"Error: Service has no hosts and/or service_description"
Is there a way I could have broken the * hostgroup?
Issue with wildcard hostgroup
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Issue with wildcard hostgroup
Do you have any hostgroups that do not have any hosts assigned? That could cause the problem you are indicating.
Re: Issue with wildcard hostgroup
I probably do. I am building this up bit by bit for a few thousand hosts, so it is very possible. I will investigate in the AM.
Thanks!
Thanks!
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Issue with wildcard hostgroup
Sounds good, let us knowbomahony wrote:I probably do. I am building this up bit by bit for a few thousand hosts, so it is very possible. I will investigate in the AM.
Thanks!
Re: Issue with wildcard hostgroup
Didnt work. I did have some HG with empty member list, but I resolved that. All 28 HG have at least one member.
I also updated to 5.5.4, and also checked to ensure every service also had a HG or Host assigned to it [and not just the exclusions]
I can reproduce in GUI by adding the * to the service, and saving. BEFORE applying if i go back in to the service the * has disappeared.
I also updated to 5.5.4, and also checked to ensure every service also had a HG or Host assigned to it [and not just the exclusions]
I can reproduce in GUI by adding the * to the service, and saving. BEFORE applying if i go back in to the service the * has disappeared.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Issue with wildcard hostgroup
I just confirmed this behavior. I will be filing a bug report.bomahony wrote:I can reproduce in GUI by adding the * to the service, and saving. BEFORE applying if i go back in to the service the * has disappeared.
Re: Issue with wildcard hostgroup
Thanks mate. Ill figure out a workaround for now.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Issue with wildcard hostgroup
sounds good, locking threadbomahony wrote:Thanks mate. Ill figure out a workaround for now.