common.conf 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #
  2. # Global checks for every Host
  3. #
  4. apply Service "ping4" {
  5. import "generic-service"
  6. check_command = "ping4"
  7. if (host.vars.service_param["ping"]["warn"]) {
  8. vars.ping_wrta = host.vars.service_param["ping"]["warn"]
  9. }
  10. if (host.vars.service_param["ping"]["crit"]) {
  11. vars.ping_crta = host.vars.service_param["ping"]["crit"]
  12. }
  13. assign where host.address
  14. ignore where host.vars.service_param["ping"]["ignore"]
  15. }
  16. apply Service "ping6" {
  17. import "generic-service"
  18. check_command = "ping6"
  19. if (host.vars.service_param["ping"]["warn"]) {
  20. vars.ping_wrta = host.vars.service_param["ping"]["warn"]
  21. }
  22. if (host.vars.service_param["ping"]["crit"]) {
  23. vars.ping_crta = host.vars.service_param["ping"]["crit"]
  24. }
  25. assign where host.address6
  26. ignore where host.vars.service_param["ping"]["ignore"]
  27. }
  28. apply Service "dns" {
  29. import "generic-service"
  30. check_command = "dns"
  31. check_interval = 5m
  32. assign where host.address
  33. }
  34. apply Service "cluster zone" {
  35. import "generic-service"
  36. check_command = "cluster-zone"
  37. assign where host.address && host.vars.os == "Linux"
  38. ignore where host.vars.noagent
  39. ignore where host.name == NodeName
  40. }
  41. apply Service "icinga" {
  42. import "generic-service"
  43. check_command = "icinga"
  44. if (host.name != NodeName) {
  45. command_endpoint = host.name
  46. }
  47. assign where host.address && host.vars.os == "Linux"
  48. ignore where host.vars.noagent
  49. }