ok ping doesnt need to be a template. all.cfg needs a group which says you cant ping it

This commit is contained in:
Stephen Smoogen 2020-02-26 23:46:07 +00:00 committed by Pierre-Yves Chibon
parent 5dafec9444
commit ba1b6c933d
2 changed files with 7 additions and 1 deletions

View file

@ -1,5 +1,5 @@
define service {
hostgroup_name {% for host in groups['all']|sort %}{% if hostvars[host].nagios_Can_Connect == true or hostvars[host].nagios_Check_Services['ping'] == true %}{{host}}, {% endif %}{% endfor %}, !buildvm_armv7, !buildvm_s390x, !buildvm_s390x_stg
hostgroup_name all,!no_ping, !buildvm_armv7, !buildvm_s390x, !buildvm_s390x_stg
service_description ICMP-Ping4
check_command check_ping4!350.0,20%!500.0,60%
use criticaltemplate

View file

@ -13,6 +13,12 @@ define hostgroup{
{% endif %}
{% endfor %}
define hostgroup{
hostgroup_name no_ping
alias no_ping
members {% for host in groups['all']|sort %}{% if hostvars[host].nagios_Check_Services['ping'] == true or hostvars[host].nagios_Can_Connect == true %}{{host}}, {% endif %}{% endfor %}
}
## Services with minimal monitoring
define hostgroup{