A Notification Plugin for Nagios and compatible software (e.g. Icinga) to enable notifications via DaDaPush.
-
Copy
nagios-dadapush.sh
to/usr/local/nagios/libexec
. -
Create an DaDaPush Channel and Copy channel token.
-
Create the command definitions in your Nagios configuration:
define command {
command_name notify-host-by-dadapush
command_line /usr/local/nagios/libexec/nagios-dadapush.sh -a "$NOTIFICATIONTYPE$" -b "$HOSTNAME$" -c "$HOSTSTATE$" -d "$HOSTOUTPUT$" -T "DADAPUSH_CHANNEL_TOKEN"
}
define command {
command_name notify-service-by-dadapush
command_line /usr/local/nagios/libexec/nagios-dadapush.sh -a "$NOTIFICATIONTYPE$" -b "$HOSTNAME$" -e "$SERVICEDESC$" -f "$SERVICESTATE$" -g "$SERVICEOUTPUT$" -T "DADAPUSH_CHANNEL_TOKEN"
}
- Create the contact definition in your Nagios configuration:
define contact {
contact_name dadapush
alias dadapush
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,r
host_notification_commands notify-host-by-dadapush
service_notification_commands notify-service-by-dadapush
}
- Add the contact to a contact group in your Nagios configuration:
define contactgroup{
contactgroup_name network-admins
alias Network Administrators
members email, dadapush
}
read full Setup Nagios DaDaPush Notification Plugin
This script has been tested on multiple servers with different versions of curl.
Please fork and contribute if you find any bugs.