network.conf 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. #
  2. # Network related checks (FFHO-built)
  3. #
  4. #
  5. # ifupdown2
  6. apply Service "ifupdown2" {
  7. import "generic-service"
  8. check_command = "ifupdown2"
  9. if (host.name != NodeName) {
  10. command_endpoint = host.name
  11. }
  12. assign where host.address && host.vars.os == "Linux"
  13. }
  14. #
  15. # bird process
  16. apply Service "bird" {
  17. import "generic-service"
  18. check_command = "procs"
  19. if (host.name != NodeName) {
  20. command_endpoint = host.name
  21. }
  22. vars.procs_command = "bird"
  23. vars.procs_critical = "1:"
  24. vars.procs_warning = ":1"
  25. check_interval = 5m
  26. max_check_attempts = 3
  27. retry_interval = 3m
  28. assign where host.address && host.vars.os == "Linux" && "router" in host.vars.roles
  29. }
  30. apply Service "bird6" {
  31. import "generic-service"
  32. check_command = "procs"
  33. if (host.name != NodeName) {
  34. command_endpoint = host.name
  35. }
  36. vars.procs_command = "bird6"
  37. vars.procs_critical = "1:"
  38. vars.procs_warning = ":1"
  39. check_interval = 5m
  40. max_check_attempts = 3
  41. retry_interval = 3m
  42. assign where host.address && host.vars.os == "Linux" && "router" in host.vars.roles
  43. }
  44. #
  45. # bird OSPF
  46. apply Service "bird_ospf" {
  47. import "generic-service"
  48. check_command = "bird_ospf"
  49. if (host.name != NodeName) {
  50. command_endpoint = host.name
  51. }
  52. assign where host.address && host.vars.os == "Linux" && "router" in host.vars.roles
  53. }
  54. apply Service "bird_ospf6" {
  55. import "generic-service"
  56. check_command = "bird_ospf"
  57. vars.ipv6 = true
  58. if (host.name != NodeName) {
  59. command_endpoint = host.name
  60. }
  61. assign where host.address && host.vars.os == "Linux" && "router" in host.vars.roles
  62. }
  63. #
  64. # bird iBGP
  65. apply Service "bird_ibgp4" {
  66. import "generic-service"
  67. check_command = "bird_bgp"
  68. if (host.name != NodeName) {
  69. command_endpoint = host.name
  70. }
  71. vars.ibgp = true
  72. vars.ibgp_w = "1:1"
  73. vars.ibgp_c = "2:"
  74. vars.asn = 65132
  75. vars.proto = "4"
  76. assign where host.address && host.vars.os == "Linux" && "router" in host.vars.roles
  77. }
  78. apply Service "bird_ibgp6" {
  79. import "generic-service"
  80. check_command = "bird_bgp"
  81. if (host.name != NodeName) {
  82. command_endpoint = host.name
  83. }
  84. vars.ibgp = true
  85. vars.ibgp_w = "1:1"
  86. vars.ibgp_c = "2:"
  87. vars.asn = 65132
  88. vars.proto = "6"
  89. assign where host.address && host.vars.os == "Linux" && "router" in host.vars.roles
  90. }
  91. #
  92. # bird eBGP
  93. apply Service "bird_ebgp4" {
  94. import "generic-service"
  95. check_command = "bird_bgp"
  96. if (host.name != NodeName) {
  97. command_endpoint = host.name
  98. }
  99. vars.ebgp = true
  100. vars.asn = 65132
  101. vars.proto = "4"
  102. assign where host.address && host.vars.os == "Linux" && "ffrl-exit" in host.vars.roles
  103. }
  104. apply Service "bird_ebgp6" {
  105. import "generic-service"
  106. check_command = "bird_bgp"
  107. if (host.name != NodeName) {
  108. command_endpoint = host.name
  109. }
  110. vars.ebgp = true
  111. vars.asn = 65132
  112. vars.proto = "6"
  113. assign where host.address && host.vars.os == "Linux" && "ffrl-exit" in host.vars.roles
  114. }