network.conf 3.6 KB

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