Просмотр исходного кода

icinga2: Check NTP service only on services nodes/IPs.

Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
Maximilian Wilhelm 7 лет назад
Родитель
Сommit
3b77f09078
1 измененных файлов с 7 добавлено и 15 удалено
  1. 7 15
      icinga2/services/ntp.conf

+ 7 - 15
icinga2/services/ntp.conf

@@ -11,7 +11,7 @@ object Host "ntp.srv.in.ffho.net" {
 	address = "10.132.251.123"
 	address6 = "2a03:2260:2342:f251::123"
 
-	vars.roles = [
+	vars.services = [
 		"ntp",
 	]
 }									
@@ -24,7 +24,7 @@ object Host "ntp01.srv.in.ffho.net" {
 	address = "10.132.251.124"
 	address6 = "2a03:2260:2342:f251::124"
 
-	vars.roles = [
+	vars.services = [
 		"ntp",
 	]
 }
@@ -37,7 +37,7 @@ object Host "ntp02.srv.in.ffho.net" {
 	address = "10.132.251.125"
 	address6 = "2a03:2260:2342:f251::125"
 
-	vars.roles = [
+	vars.services = [
 		"ntp",
 	]
 }
@@ -50,13 +50,12 @@ object Host "ntp03.srv.in.ffho.net" {
 	address = "10.132.251.126"
 	address6 = "2a03:2260:2342:f251::126"
 
-	vars.roles = [
+	vars.services = [
 		"ntp",
 	]
 }
 
 
-
 # Check NTP servers
 apply Service "ntp4" {
 	import "generic-service"
@@ -64,7 +63,7 @@ apply Service "ntp4" {
 	check_command = "ntp_time"
 	vars.ntp_ipv4 = true
 
-	assign where host.address && "ntp" in host.vars.roles
+	assign where host.address && "ntp" in host.vars.services
 }
 
 apply Service "ntp6" {
@@ -73,12 +72,10 @@ apply Service "ntp6" {
 	check_command = "ntp_time"
 	vars.ntp_ipv6 = true
 
-	assign where host.address6 && "ntp" in host.vars.roles
-
+	assign where host.address6 && "ntp" in host.vars.services
 }
 
-
-# Check ntpd running on every node
+# Check if ntpd is running on every node
 apply Service "ntpd" {
 	import "generic-service"
 
@@ -95,10 +92,5 @@ apply Service "ntpd" {
 	max_check_attempts = 3
 	retry_interval = 5m
 
-	vars.group = "dienstchecks"
-
 	assign where host.address && host.vars.os == "Linux"
 }
-
-
-