network.conf 3.1 KB

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