nagiosnotification
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
| nagiosnotification [2018/04/03 12:20] – [Define DAPNET Username and Password] dh3wr | nagiosnotification [2026/01/30 13:11] (aktuell) – Fix urls dj7lc | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| - | ====== Notification to Pager from Nagios ====== | + | ====== Notification to Pager from Nagios |
| - | By default, Nagios can send emails to registered contact. Fortunately, | + | By default, Nagios can send emails to registered contact. Fortunately, |
| + | |||
| + | If you want to send the notifications directly via [[unipager|UniPager]], | ||
| ===== Define commands to send paging calls ===== | ===== Define commands to send paging calls ===== | ||
| Zeile 10: | Zeile 12: | ||
| define command{ | define command{ | ||
| command_name | command_name | ||
| - | command_line | + | command_line |
| } | } | ||
| Zeile 16: | Zeile 18: | ||
| define command{ | define command{ | ||
| command_name | command_name | ||
| - | command_line | + | command_line |
| } | } | ||
| + | |||
| </ | </ | ||
| - | ===== Define DAPNET | + | ===== Define DAPNET |
| - | As you see, there are macros '' | + | As you see, there are macros '' |
| < | < | ||
| + | $USER11$=http:// | ||
| $USER12$=dl1abc | $USER12$=dl1abc | ||
| $USER13$=VERYSCECRETPASSWORD | $USER13$=VERYSCECRETPASSWORD | ||
| </ | </ | ||
| + | |||
| + | If you don't have HAMNET access to dapnet.db0sda.hamnet.radio, | ||
| + | |||
| + | ===== Setup contacts ===== | ||
| + | Edit '' | ||
| + | < | ||
| + | define contact{ | ||
| + | contact_name | ||
| + | alias Ralf Wilke | ||
| + | service_notifications_enabled | ||
| + | host_notifications_enabled | ||
| + | service_notification_period | ||
| + | host_notification_period | ||
| + | service_notification_options | ||
| + | host_notification_options | ||
| + | service_notification_commands | ||
| + | host_notification_commands | ||
| + | email | ||
| + | pager dh3wr | ||
| + | address1 | ||
| + | } | ||
| + | |||
| + | </ | ||
| + | The '' | ||
| + | |||
| + | {{: | ||
| + | |||
| + | ===== Assign the contact to the host or service ===== | ||
| + | Either use the template or define at each host and service the contacts you want to notify. | ||
| + | < | ||
| + | define host{ | ||
| + | name generic-host-rwthafu | ||
| + | notifications_enabled | ||
| + | event_handler_enabled | ||
| + | flap_detection_enabled | ||
| + | failure_prediction_enabled | ||
| + | process_perf_data | ||
| + | retain_status_information | ||
| + | retain_nonstatus_information | ||
| + | check_command | ||
| + | max_check_attempts | ||
| + | notification_interval | ||
| + | notification_period | ||
| + | notification_options | ||
| + | contacts | ||
| + | register | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ===== Example ===== | ||
| + | This is how the result looks like: | ||
| + | {{ : | ||
nagiosnotification.1522758035.txt.gz · Zuletzt geändert: 2018/04/03 12:20 von dh3wr