Regular Expressions matching in hostgroups

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jcass
Posts: 7
Joined: Mon Jul 24, 2017 4:52 am

Regular Expressions matching in hostgroups

Post 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
Last edited by jcass on Fri Aug 18, 2017 3:08 am, edited 1 time in total.
User avatar
tgriep
Madmin
Posts: 9179
Joined: Thu Oct 30, 2014 9:02 am

Re: Regular Expressions matching in hostgroups

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
jcass
Posts: 7
Joined: Mon Jul 24, 2017 4:52 am

Re: Regular Expressions matching in hostgroups

Post by jcass »

Okay, that's great,

thank-you for your help @tgriep.
Locked