ntp.conf 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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. object Host "ntp03.srv.in.ffho.net" {
  33. import "generic-dummy-host"
  34. display_name = "ntp03.srv.in.ffho.net"
  35. address = "10.132.251.126"
  36. address6 = "2a03:2260:2342:f251::126"
  37. vars.services = [
  38. "ntp",
  39. ]
  40. }
  41. # Check NTP servers
  42. apply Service "ntp4" {
  43. import "generic-service"
  44. check_command = "ntp_time"
  45. vars.ntp_ipv4 = true
  46. assign where host.address && "ntp" in host.vars.services
  47. }
  48. apply Service "ntp6" {
  49. import "generic-service"
  50. check_command = "ntp_time"
  51. vars.ntp_ipv6 = true
  52. assign where host.address6 && "ntp" in host.vars.services
  53. }
  54. # Check if ntpd is running on every node
  55. apply Service "ntpd" {
  56. import "generic-service"
  57. check_command = "procs"
  58. if (host.name != NodeName) {
  59. command_endpoint = host.name
  60. }
  61. vars.procs_critical = "1:"
  62. vars.procs_warning = ":1"
  63. vars.procs_command = "ntpd"
  64. check_interval = 1h
  65. max_check_attempts = 3
  66. retry_interval = 5m
  67. assign where host.address && host.vars.os == "Linux"
  68. }