Am 30.10.2014 um 15:37 schrieb Shaw, Brian:
Is there any documentation on when and how you can use “assign where match”?
I’m trying to do something like the following:
apply Service "Disk Space - /partition” {
import "disk-check"
vars.nrpe_remote_arglist = "10% /partition"
assign where match ("App 1 Name*", host.groups)
}
In our environment we have a number of host groups that start with the same
application name but end with something unique such as “App 1 Name Web”, “App 1
Name DBs”, “App 2 Name Web”, “App 2 Name DBs”. I want to check for a shared
partition that is unique to all the “App 1 Name” machines but is different than
the data partition that is unique to all “App 2 Name” machines.
This exact type of assign statement works fine for “object HostGroup” blocks.
If “assign where match” doesn’t work in the “apply Service” block, is there
another shorthand way to locate my groups or do I have to list each group
specifically and manage that list over time?
Maybe regex() fulfills your requirement better than match().
http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/configuring-icinga2#function-calls
Thanks for your help.
Brian
NOTICE:
This message, and any attachments, contain(s) information that may be
confidential or protected by privilege from disclosure and is intended only for
the individual or entity named above. No one else may disclose, copy,
distribute or use the contents of this message for any purpose. Its
unauthorized use, dissemination or duplication is strictly prohibited and may
be unlawful. If you receive this message in error or you otherwise are not an
authorized recipient, please immediately delete the message and any attachments
and notify the sender.
_______________________________________________
icinga-users mailing list
[email protected]<mailto:[email protected]>
https://lists.icinga.org/mailman/listinfo/icinga-users
--
Michael Friedrich, DI (FH)
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]
** OSMC 2014 - November - netways.de/osmc **
** OpenNebula Conf 2014 - Dezember - opennebulaconf.com **
** OSDC 2015 - April - osdc.de **
** Puppet Camp Berlin 2015 - April - netways.de/puppetcamp **
_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users