On 02/02/17 18:32, Jan Matis wrote:
Hi all,
this is to my understanding quite easily achievable in icinga2 : (not
tested, but this is where i'd start )
apply Service "app: tomcat" {
import "generic-service"
check_command = "nrpe"
vars.nrpe_command = "check_tomcat"
assign where "tomcats" in host.groups
ignore where match("internal*", host.name <http://host.name>)
}
Unfortunately, I have icinga1 on the server, where I need to
implement this
(and no power over changing to icinga2), so I have started with
define service{
use generic-service-nobody
hostgroups tomcats
host_name !internal*
service_description app: tomcat
check_command check_nrpe!check_tomcat
}
the usage of * failed during service icinga checkconfig
and after going through icinga1 documentation I'm starting to think
this it not possible in icinga1.
The reason why I'm trying to do this, is that we have host definitions
that include aws instanceid in the host name and those instance ids
are changing in time. so I also can not write whole host name (as
internal_i-234sdq234) because upon next icinga restart that host
definition might not exist anymore and there could be another
(internal-i_123asdf324tre )
Is there any way to use regular expression in service definitions in
icinga1 ? Or any other way of achieving this in icinga1 ?
many thanks in advance
Jan
Yes it possible, are you using an automated method to register the hosts ?
you can just add the host (via templates) to the host group and that way
any service check assigned to the group will be applied to the host in
that group.
_______________________________________________
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users
_______________________________________________
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users