Am 2017-12-21 04:20, schrieb Jayapandian Ponraj:
Thanks for the reply
We do heavily use apply rules based on host variables and for hostgroup
definitions, but once in a while we come across a service which is
spread across 2 or 3 hosts which don't share anything in common. We can
go ahead add separate service definition for each of them(not
preferred) or write an apply rule with a reflex matching those specific
hosts.
Adding plain service definition for a single host and switching over to
apply rules when 2 or 3 hosts are involved feels counter-intuitive.
Since service definitions will be added by many teams would like to
keep it simple..
So need a simple and elegant solution keeping in mind the common
pitfalls.
https://www.icinga.com/2016/04/28/avoiding-common-pitfalls-with-apply-rules/
So idea is to keep it simple and avoid the pitfalls and performance
issues.
Hi there,
I'd say there are at least a few ways to keep it simple and achieve your
solution.
Probably my preferred solution would be to use an explicit assign
statement within your apply rule for every host:
assign where host.name == "host1"
assign where host.name == "host2"
assign where host.name == "host3"
Another possibility is to use a host group for these hosts, but to me
this seems counter-intuitive as it groups hosts together which just
share a service.
Regards,
Markus
_______________________________________________
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users