Guest User

Untitled

a guest
Dec 6th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. apt install icinga2
  2. apt install nsca-ng-server
  3.  
  4. apt install nsca-ng-client
  5.  
  6. command_file = "/run/icinga2/cmd/icinga2.cmd"
  7. user = "nagios"
  8.  
  9. authorize "example" {
  10. password = "PASSWORD"
  11. host = "example.com"
  12. services = {
  13. "*",
  14. }
  15. }
  16.  
  17. object Host "example"{
  18. import
  19. name = "example.com"
  20. address = "example.com"
  21.  
  22. # mark as node
  23. var.is_node = "true"
  24.  
  25. # default check intervals
  26. max_check_attempts = 7
  27. retry_interval = 1m
  28.  
  29. # add this if you want mail notifications
  30. vars.notification["mail"] = {
  31. groups = [ "icingaadmins" ]
  32. }
  33. }
  34.  
  35. template Service "remote_passive" {
  36. import "generic-service"
  37. check_interval = 10m
  38. retry_interval = 1m
  39. check_command = passive
  40. }
  41.  
  42. apply Service "serivce-name" {
  43. import "remote_passive"
  44. assign where host.var.is_node
  45. }
  46.  
  47. server = "example.com"
  48. identity = "example"
  49. password = "PASSWORD"
  50.  
  51. user<TAB>service-name<TAB>command-to-execute-with-args
  52.  
  53. nobody test-apt /usr/lib/nagios/plugins/check_apt -o
  54.  
  55. /etc/monitoring/monitoring-report.py -c /PATH/TO/monitoring.conf
Add Comment
Please, Sign In to add comment