nagiosnotification
Dies ist eine alte Version des Dokuments!
Inhaltsverzeichnis
Notification to Pager from Nagios
By default, Nagios can send emails to registered contact. Fortunately, there is also a contact property names pager which can be used very conveniently. Two things have to be added to your nagios config in order to reveice the Nagios notifications via DAPNET.
Define commands to send paging calls
Edit commands.cfg and add the following lines:
# 'notify-host-by-pager' command definition
define command{
command_name notify-host-by-pager
command_line /usr/bin/curl -H "Content-Type: application/json" -X POST -u $USER12$:$USER13$ -d '{ "text": "NAGIOS $NOTIFICATIONTYPE$: $HOSTNAME$ $$
}
# 'notify-service-by-pager' command definition
define command{
command_name notify-service-by-pager
command_line /usr/bin/curl -H "Content-Type: application/json" -X POST -u $USER12$:$USER13$ -d '{ "text": "NAGIOS $NOTIFICATIONTYPE$: $HOSTNAME$ $$
}
Define DAPNET Username and Password
As you see, there are macros $USER12$ and $USER13$ used. They should contain your DAPNET username and password. Define them in the resource.cfg:
$USER12$=dl1abc $USER13$=VERYSCECRETPASSWORD
nagiosnotification.1522758035.txt.gz · Zuletzt geändert: 2018/04/03 12:20 von dh3wr