network.conf 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  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. if (host.name != NodeName) {
  51. command_endpoint = host.name
  52. }
  53. assign where host.address && host.vars.os == "Linux" && "router" in host.vars.roles
  54. }
  55. apply Service "bird_ospf6" {
  56. import "generic-service"
  57. check_command = "bird_ospf"
  58. vars.ipv6 = true
  59. if (host.name != NodeName) {
  60. command_endpoint = host.name
  61. }
  62. assign where host.address && host.vars.os == "Linux" && "router" in host.vars.roles
  63. }
  64. #
  65. # bird iBGP
  66. apply Service "bird_ibgp4" {
  67. import "generic-service"
  68. check_command = "bird_bgp"
  69. if (host.name != NodeName) {
  70. command_endpoint = host.name
  71. }
  72. vars.ibgp = true
  73. vars.ibgp_w = "1:1"
  74. vars.ibgp_c = "2:"
  75. vars.asn = 65132
  76. vars.proto = "4"
  77. assign where host.address && host.vars.os == "Linux" && "router" in host.vars.roles
  78. }
  79. apply Service "bird_ibgp6" {
  80. import "generic-service"
  81. check_command = "bird_bgp"
  82. if (host.name != NodeName) {
  83. command_endpoint = host.name
  84. }
  85. vars.ibgp = true
  86. vars.ibgp_w = "1:1"
  87. vars.ibgp_c = "2:"
  88. vars.asn = 65132
  89. vars.proto = "6"
  90. assign where host.address && host.vars.os == "Linux" && "router" in host.vars.roles
  91. }
  92. #
  93. # bird eBGP
  94. apply Service "bird_ebgp4" {
  95. import "generic-service"
  96. check_command = "bird_bgp"
  97. if (host.name != NodeName) {
  98. command_endpoint = host.name
  99. }
  100. vars.ebgp = true
  101. vars.asn = 65132
  102. vars.proto = "4"
  103. assign where host.address && host.vars.os == "Linux" && "ffrl-exit" in host.vars.roles
  104. }
  105. apply Service "bird_ebgp6" {
  106. import "generic-service"
  107. check_command = "bird_bgp"
  108. if (host.name != NodeName) {
  109. command_endpoint = host.name
  110. }
  111. vars.ebgp = true
  112. vars.asn = 65132
  113. vars.proto = "6"
  114. assign where host.address && host.vars.os == "Linux" && "ffrl-exit" in host.vars.roles
  115. }