Page 1 of 1

Host group member regex confusion

Posted: Wed Aug 25, 2021 10:35 am
by evolart
I am taking over management of a very old Nagios instance and trying to figure out someone else's config files.

We have

Code: Select all

use_regexp_matching=1
set in the nagios.cfg

and in one of the hostgroups we have members defined as:

Code: Select all

members         ^a-*


That host group is properly picking up these hosts:

a-power-1
a-power-2
a-cyc-1

However it's also picking up the following hosts and I cannot figure out why.

art-pool-1
art-pool-2
art-pool-3

Any help would be appreciated.

Re: Host group member regex confusion

Posted: Wed Aug 25, 2021 11:43 am
by mcapra
You might try ^(a-).* instead.

Re: Host group member regex confusion

Posted: Wed Aug 25, 2021 12:01 pm
by evolart
Thank you, that worked like a charm. Now for me to do some digging to understand why :D

Re: Host group member regex confusion

Posted: Thu Sep 02, 2021 9:52 am
by benjaminsmith
Thank you, that worked like a charm. Now for me to do some digging to understand why :D
Thanks @mcapra for helping out

We'll go ahead and mark this as resolved, but feel free to open another post if you have any new questions.

Thank you for using the Nagios Community Forum.