Issue with wildcard hostgroup

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
bomahony
Posts: 133
Joined: Wed Jul 04, 2018 10:46 am

Issue with wildcard hostgroup

Post 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?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Issue with wildcard hostgroup

Post by scottwilkerson »

Do you have any hostgroups that do not have any hosts assigned? That could cause the problem you are indicating.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
bomahony
Posts: 133
Joined: Wed Jul 04, 2018 10:46 am

Re: Issue with wildcard hostgroup

Post 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!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Issue with wildcard hostgroup

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
bomahony
Posts: 133
Joined: Wed Jul 04, 2018 10:46 am

Re: Issue with wildcard hostgroup

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Issue with wildcard hostgroup

Post 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.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
bomahony
Posts: 133
Joined: Wed Jul 04, 2018 10:46 am

Re: Issue with wildcard hostgroup

Post by bomahony »

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

Post by scottwilkerson »

bomahony wrote:Thanks mate. Ill figure out a workaround for now.
sounds good, locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked