Réf. : Nagios-devel digest, Vol 1 #832 - 5 msgs
Yann DIRSON
yann.dirson at sagem.com
Thu Jun 9 11:40:43 CEST 2005
(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 SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
More information about the Developers
mailing list