Host group member regex confusion

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

Host group member regex confusion

Postby evolart » Wed Aug 25, 2021 10:35 am

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.
evolart
 
Posts: 2
Joined: Mon Jun 01, 2020 11:47 am

Re: Host group member regex confusion

Postby mcapra » Wed Aug 25, 2021 11:43 am

You might try ^(a-).* instead.
Former Nagios employee
https://www.mcapra.com/
User avatar
mcapra
 
Posts: 3711
Joined: Thu May 05, 2016 3:54 pm

Re: Host group member regex confusion

Postby evolart » Wed Aug 25, 2021 12:01 pm

Thank you, that worked like a charm. Now for me to do some digging to understand why :D
evolart
 
Posts: 2
Joined: Mon Jun 01, 2020 11:47 am

Re: Host group member regex confusion

Postby benjaminsmith » Thu Sep 02, 2021 9:52 am

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!
User avatar
benjaminsmith
 
Posts: 4944
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul


Return to Community Support

Who is online

Users browsing this forum: No registered users and 21 guests