Page 1 of 1
Regex in hostgroup members
Posted: Fri Feb 19, 2016 6:03 am
by kobazik
Hi,
Does regex in nagios support all standard regex filters?
I can't get case-insenstive filter to work in below example:
define hostgroup
hostgroup_name Prod
memebers ^(?i)(prd|PRD).*
}
Re: Regex in hostgroup members
Posted: Fri Feb 19, 2016 9:59 am
by eloyd
Taken from
https://assets.nagios.com/downloads/nag ... ricks.html:
If you wish, you can enable regular expression matching for object names by using the use_regexp_matching config option. By default, regular expression matching will only be used in object names that contain *, ?, +, or \.. If you want regular expression matching to be used on all object names, enable the use_true_regexp_matching config option. Regular expressions can be used in any of the fields used in the examples below (host names, hostgroup names, service names, and servicegroup names).
Hope that helps.
Re: Regex in hostgroup members
Posted: Fri Feb 19, 2016 10:29 am
by rkennedy
Thanks @eloyd!
@kobazik - let us know if you need any further assistance.