Hi,
Icinga 2 doesn’t currently have any CIDR-matching function (it probably should
though: submit a feature request at dev.icinga.org). However, you could use a
regular expression:
acheron:~ gunnar$ icinga2 console
Icinga (version: v2.3.0-150-gaa452a7)
<1> => ip = "172.16.0.54"
null
<2> => regex("172\\.16\\.0\\.(3[3-9]|[4-5][0-9]|6[0-2])", ip)
true
<3> =>
Regards,
Gunnar
On 23/04/15 14:48, "Panos Melas" <[email protected]> wrote:
>Hello,
>
>I would like to define a HostGroup, e.g. DMZ, and assign all hosts,
>which are defined using static IP addresses, to that group and they
>belong to that IP address range, e.g. 34-62.
>
>object HostGroup "dmz2" {
> display_name = "DMZ 2"
>
> assign where host.address == "172.16.0.[33-62]"
>}
>
>
>Or is there any other way to create such a group, without assigning each
>host to the group explicitly?
>
>Thanks
>
>Panos
>
>_______________________________________________
>icinga-users mailing list
>[email protected]
>https://lists.icinga.org/mailman/listinfo/icinga-users
--
Gunnar Beutner
Application Developer
NETWAYS GmbH | Deutschherrnstr. 15-19 | D-90429 Nuernberg
Tel: +49 911 92885-0 | Fax: +49 911 92885-77
GF: Julian Hein, Bernd Erk | AG Nuernberg HRB18461
http://www.netways.de | [email protected]
** OSDC 2015 - April - osdc.de **
** Puppet Camp Berlin 2015 - April - netways.de/puppetcamp **
** OSBConf 2015 - September - osbconf.org **
_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users