common.conf 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. }
  15. apply Service "ping6" {
  16. import "generic-service"
  17. check_command = "ping6"
  18. if (host.vars.service_param["ping"]["warn"]) {
  19. vars.ping_wrta = host.vars.service_param["ping"]["warn"]
  20. }
  21. if (host.vars.service_param["ping"]["crit"]) {
  22. vars.ping_crta = host.vars.service_param["ping"]["crit"]
  23. }
  24. assign where host.address6
  25. }
  26. apply Service "dns" {
  27. import "generic-service"
  28. check_command = "dns"
  29. check_interval = 5m
  30. assign where host.address
  31. }
  32. apply Service "cluster zone" {
  33. import "generic-service"
  34. check_command = "cluster-zone"
  35. assign where host.address && host.vars.os == "Linux"
  36. ignore where host.vars.noagent
  37. ignore where host.name == NodeName
  38. }
  39. apply Service "icinga" {
  40. import "generic-service"
  41. check_command = "icinga"
  42. if (host.name != NodeName) {
  43. command_endpoint = host.name
  44. }
  45. assign where host.address && host.vars.os == "Linux"
  46. ignore where host.vars.noagent
  47. }