Page 1 of 1

Issue with wildcard hostgroup

Posted: Tue Oct 09, 2018 10:05 am
by bomahony
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?

Re: Issue with wildcard hostgroup

Posted: Tue Oct 09, 2018 10:54 am
by scottwilkerson
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

Posted: Tue Oct 09, 2018 11:50 am
by bomahony
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

Posted: Tue Oct 09, 2018 11:56 am
by scottwilkerson
bomahony 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!
Sounds good, let us know

Re: Issue with wildcard hostgroup

Posted: Wed Oct 10, 2018 5:30 am
by bomahony
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.

Re: Issue with wildcard hostgroup

Posted: Wed Oct 10, 2018 3:18 pm
by scottwilkerson
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.
I just confirmed this behavior. I will be filing a bug report.

Re: Issue with wildcard hostgroup

Posted: Tue Oct 16, 2018 5:30 am
by bomahony
Thanks mate. Ill figure out a workaround for now.

Re: Issue with wildcard hostgroup

Posted: Tue Oct 16, 2018 7:18 am
by scottwilkerson
bomahony wrote:Thanks mate. Ill figure out a workaround for now.
sounds good, locking thread