[Nagios-devel] =?ISO-8859-1?Q?R=E9f=2E_=3A_Nagios-devel_digest=2C_Vol_1_#832_-_5_msgs?=

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

[Nagios-devel] =?ISO-8859-1?Q?R=E9f=2E_=3A_Nagios-devel_digest=2C_Vol_1_#832_-_5_msgs?=

Post by Guest »

(about multiple occurences of a property)
> It is intended behaviour (an easter egg, more like it, but it's nifty).

OK, I do not see any pratical use for it at first glance, do you have an
example of use ?


> Feel free to submit a patch for the documentation.

OK, but I'll have to get a better understanding of those features first :)


> You can do contact_groups *
> in the "master" template, and exclude them in the others(contact_groups
> !notwanted). That way it will get complemented rather than overwritten.

Hm, looks like this is not documented either :)
Trying on my own on another example (use_regexp_matching=0) where I missed
an exclusion mechanism already, the following does not work:

define service{
name everything
use infra-service
host_name *
register 0
}
define service{
service_description PING
use everything
host_name !croiseur
max_check_attempts 3
notification_interval 240
contact_groups unix-admins
servicegroups net-resources
check_command check_ping!100.0,20%!500.0,60%
}

=> "Error: Could not expand hostgroups and/or hosts specified in service",
pointing to the PING service

> You can also turn on regular expression matching and name your
> hostgroups so that you can use it easily. It will triple the load-time
> of nagios but you will get what you want (with fewer lines of config
> than earlier).

What do you mean ? Even the following is rejected:

define hostgroup{
hostgroup_name g1,g2
alias whatever
}

=> "Error: The name of hostgroup 'g1,g2' contains one or more illegal
characters."

Regexps are also quite under-documented - eg. there are so many flavours
of them, which one was selected ? Plain POSIX ones ?

I also tried, with use_regexp_matching=1, "hostgroup_name g[12]" (which
is accepted but counts for a single hostgroup !), and "hostgroup_name
g(1|2)" which is refused as "contains one or more illegal characters".

And even if that would work, I would need back-references on groups in the
regexps, so the alias can be something meaningful. Can we do that, and if
yes, using which syntax ?






This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked