Host group member regex confusion

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
evolart
Posts: 2
Joined: Mon Jun 01, 2020 11:47 am

Host group member regex confusion

Post 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.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Host group member regex confusion

Post by mcapra »

You might try ^(a-).* instead.
Former Nagios employee
https://www.mcapra.com/
evolart
Posts: 2
Joined: Mon Jun 01, 2020 11:47 am

Re: Host group member regex confusion

Post by evolart »

Thank you, that worked like a charm. Now for me to do some digging to understand why :D
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Host group member regex confusion

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked