Page 1 of 1

Regular Expressions matching in hostgroups

Posted: Thu Aug 17, 2017 5:27 am
by jcass
Hi,

I'm currently doing a test migration from an old Nagios Core (v 3.2.3) installation to the Nagios XI free trial.

I've encountered an issue however when importing host groups which use regexp matching to identify correct hosts.

For example, one host group currently finds its hosts by having "infra:*" as a member which returns all hosts beginning "infra:", though this isn't working after being imported into Nagios XI.

Is this still a possible feature to implement, and if so, where am I going wrong?

I've got "use_regexp_matching=1" and "use_true_regexp_matching=0" in the nagios.cfg file.

Thank-you for your time in advance,
Joseph

Re: Regular Expressions matching in hostgroups

Posted: Thu Aug 17, 2017 3:31 pm
by tgriep
Using regular expressions in XI is not fully supported at this time as you cannot type in a regular expression in the Core Config Manager and importing in the config, breaks the regular expression so that cannot be used.
But since XI is still running Nagios Core you can get it running by adding the following option to the nagios.cfg file.

Code: Select all

use_regexp_matching=1
And then creating the configuration file with the regex in in in the following folder.

Code: Select all

/usr/local/nagios/etc/static
That folder is used for manually maintaining external object configuration files with Nagios XI. Take a look at this link for more details.
https://support.nagios.com/kb/article/n ... ement.html

The downside of this is you cannot see, edit or use the Host Group in other objects using the XI interface.

Re: Regular Expressions matching in hostgroups

Posted: Fri Aug 18, 2017 3:07 am
by jcass
Okay, that's great,

thank-you for your help @tgriep.