nagiosnotification
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
| nagiosnotification [2018/04/03 12:17] – angelegt 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, |
| - | ===== Define DAPNET Username and Password ===== | + | If you want to send the notifications directly via [[unipager|UniPager]], |
| + | ===== Define commands to send paging calls ===== | ||
| + | Edit '' | ||
| + | < | ||
| + | # ' | ||
| + | define command{ | ||
| + | command_name | ||
| + | command_line | ||
| + | } | ||
| + | |||
| + | # ' | ||
| + | define command{ | ||
| + | command_name | ||
| + | command_line | ||
| + | } | ||
| + | |||
| + | </ | ||
| + | |||
| + | ===== Define DAPNET API-URL, username and password ===== | ||
| + | As you see, there are macros '' | ||
| + | < | ||
| + | $USER11$=http:// | ||
| + | $USER12$=dl1abc | ||
| + | $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.1522757827.txt.gz · Zuletzt geändert: 2018/04/03 12:17 von dh3wr