123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- #
- # ntp.srv.in.ffho.net
- #
- # Anycast NTP server
- object Host "ntp.srv.in.ffho.net" {
- import "generic-dummy-host"
- display_name = "ntp.srv.in.ffho.net"
- address = "10.132.251.123"
- address6 = "2a03:2260:2342:f251::123"
- vars.services = [
- "ntp",
- ]
- }
- object Host "ntp01.srv.in.ffho.net" {
- import "generic-dummy-host"
- display_name = "ntp01.srv.in.ffho.net"
- address = "10.132.251.124"
- address6 = "2a03:2260:2342:f251::124"
- vars.services = [
- "ntp",
- ]
- }
- object Host "ntp02.srv.in.ffho.net" {
- import "generic-dummy-host"
- display_name = "ntp02.srv.in.ffho.net"
- address = "10.132.251.125"
- address6 = "2a03:2260:2342:f251::125"
- vars.services = [
- "ntp",
- ]
- }
- object Host "ntp03.srv.in.ffho.net" {
- import "generic-dummy-host"
- display_name = "ntp03.srv.in.ffho.net"
- address = "10.132.251.126"
- address6 = "2a03:2260:2342:f251::126"
- vars.services = [
- "ntp",
- ]
- }
- # Check NTP servers
- apply Service "ntp4" {
- import "generic-service"
- check_command = "ntp_time"
- vars.ntp_ipv4 = true
- assign where host.address && "ntp" in host.vars.services
- }
- apply Service "ntp6" {
- import "generic-service"
- check_command = "ntp_time"
- vars.ntp_ipv6 = true
- assign where host.address6 && "ntp" in host.vars.services
- }
- # Check if ntpd is running on every node
- apply Service "ntpd" {
- import "generic-service"
- check_command = "procs"
- if (host.name != NodeName) {
- command_endpoint = host.name
- }
- vars.procs_critical = "1:"
- vars.procs_warning = ":1"
- vars.procs_command = "ntpd"
- check_interval = 1h
- max_check_attempts = 3
- retry_interval = 5m
- assign where host.address && host.vars.os == "Linux"
- }
|