network.conf 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  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. vars.ok_string = "[ OK ]"
  13. assign where host.address && host.vars.os == "Linux"
  14. ignore where "ifupdown-ng" in host.vars.tags
  15. }
  16. #
  17. # Metfilter connection tracking table size
  18. apply Service "conntrack_size" {
  19. import "generic-service"
  20. check_command = "conntrack_size"
  21. if (host.name != NodeName) {
  22. command_endpoint = host.name
  23. }
  24. assign where host.address && host.vars.os == "Linux"
  25. }
  26. #
  27. # bird process
  28. apply Service "bird" {
  29. import "generic-service"
  30. check_command = "procs"
  31. if (host.name != NodeName) {
  32. command_endpoint = host.name
  33. }
  34. vars.procs_command = "bird"
  35. vars.procs_critical = "1:"
  36. vars.procs_warning = ":1"
  37. check_interval = 5m
  38. max_check_attempts = 3
  39. retry_interval = 3m
  40. assign where host.address && host.vars.os == "Linux" && "router" in host.vars.roles
  41. }
  42. apply Service "bird6" {
  43. import "generic-service"
  44. check_command = "procs"
  45. if (host.name != NodeName) {
  46. command_endpoint = host.name
  47. }
  48. vars.procs_command = "bird6"
  49. vars.procs_critical = "1:"
  50. vars.procs_warning = ":1"
  51. check_interval = 5m
  52. max_check_attempts = 3
  53. retry_interval = 3m
  54. assign where host.address && host.vars.os == "Linux" && "router" in host.vars.roles
  55. }
  56. #
  57. # bird OSPF
  58. apply Service "bird_ospf" {
  59. import "generic-service"
  60. check_command = "bird_ospf"
  61. vars.interfaces_down_ok_file = "/etc/bird/ospf_interfaces_down_ok.txt"
  62. vars.ignore_missing_file = true
  63. vars.no_ptp_ip = true
  64. if (host.name != NodeName) {
  65. command_endpoint = host.name
  66. }
  67. assign where host.address && host.vars.os == "Linux" && "router" in host.vars.roles
  68. }
  69. apply Service "bird_ospf6" {
  70. import "generic-service"
  71. check_command = "bird_ospf"
  72. vars.proto = "6"
  73. vars.interfaces_down_ok_file = "/etc/bird/ospf_interfaces_down_ok.txt"
  74. vars.ignore_missing_file = true
  75. vars.no_ptp_ip = true
  76. if (host.name != NodeName) {
  77. command_endpoint = host.name
  78. }
  79. assign where host.address && host.vars.os == "Linux" && "router" in host.vars.roles
  80. }
  81. #
  82. # bird iBGP
  83. apply Service "bird_ibgp4" {
  84. import "generic-service"
  85. check_command = "bird_bgp"
  86. if (host.name != NodeName) {
  87. command_endpoint = host.name
  88. }
  89. vars.ibgp = true
  90. vars.ibgp_warn = "2:2"
  91. vars.ibgp_crit = "3:"
  92. vars.asn = 65132
  93. vars.proto = "4"
  94. vars.sessions_down_ok_file = "/etc/bird/ibgp_sessions_down_ok.txt"
  95. vars.ignore_missing_file = true
  96. assign where host.address && host.vars.os == "Linux" && "router" in host.vars.roles
  97. }
  98. apply Service "bird_ibgp6" {
  99. import "generic-service"
  100. check_command = "bird_bgp"
  101. if (host.name != NodeName) {
  102. command_endpoint = host.name
  103. }
  104. vars.ibgp = true
  105. vars.ibgp_warn = "2:2"
  106. vars.ibgp_crit = "3:"
  107. vars.asn = 65132
  108. vars.proto = "6"
  109. vars.sessions_down_ok_file = "/etc/bird/ibgp_sessions_down_ok.txt"
  110. vars.ignore_missing_file = true
  111. assign where host.address && host.vars.os == "Linux" && "router" in host.vars.roles
  112. }
  113. #
  114. # bird eBGP
  115. apply Service "bird_ebgp4" {
  116. import "generic-service"
  117. check_command = "bird_bgp"
  118. if (host.name != NodeName) {
  119. command_endpoint = host.name
  120. }
  121. vars.ebgp = true
  122. vars.asn = 65132
  123. vars.proto = "4"
  124. assign where host.address && host.vars.os == "Linux" && "ffrl-exit" in host.vars.roles
  125. }
  126. apply Service "bird_ebgp6" {
  127. import "generic-service"
  128. check_command = "bird_bgp"
  129. if (host.name != NodeName) {
  130. command_endpoint = host.name
  131. }
  132. vars.ebgp = true
  133. vars.asn = 65132
  134. vars.proto = "6"
  135. assign where host.address && host.vars.os == "Linux" && "ffrl-exit" in host.vars.roles
  136. }