ntp.conf 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. #
  2. # ntp.srv.in.ffho.net
  3. #
  4. # Anycast NTP server
  5. object Host "ntp.srv.in.ffho.net" {
  6. import "generic-dummy-host"
  7. display_name = "ntp.srv.in.ffho.net"
  8. address = "10.132.251.123"
  9. address6 = "2a03:2260:2342:f251::123"
  10. vars.services = [
  11. "ntp",
  12. ]
  13. }
  14. object Host "ntp01.srv.in.ffho.net" {
  15. import "generic-dummy-host"
  16. display_name = "ntp01.srv.in.ffho.net"
  17. address = "10.132.251.124"
  18. address6 = "2a03:2260:2342:f251::124"
  19. vars.services = [
  20. "ntp",
  21. ]
  22. }
  23. object Host "ntp02.srv.in.ffho.net" {
  24. import "generic-dummy-host"
  25. display_name = "ntp02.srv.in.ffho.net"
  26. address = "10.132.251.125"
  27. address6 = "2a03:2260:2342:f251::125"
  28. vars.services = [
  29. "ntp",
  30. ]
  31. }
  32. # Check NTP servers
  33. apply Service "ntp4" {
  34. import "generic-service"
  35. check_command = "ntp_time"
  36. vars.ntp_ipv4 = true
  37. assign where host.address && "ntp" in host.vars.services
  38. }
  39. apply Service "ntp6" {
  40. import "generic-service"
  41. check_command = "ntp_time"
  42. vars.ntp_ipv6 = true
  43. assign where host.address6 && "ntp" in host.vars.services
  44. }
  45. # Check if ntpd is running on every node
  46. apply Service "ntpd" {
  47. import "generic-service"
  48. check_command = "procs"
  49. if (host.name != NodeName) {
  50. command_endpoint = host.name
  51. }
  52. vars.procs_critical = "1:"
  53. vars.procs_warning = ":1"
  54. vars.procs_command = "ntpd"
  55. check_interval = 1h
  56. max_check_attempts = 3
  57. retry_interval = 5m
  58. assign where host.address && host.vars.os == "linux"
  59. }