Nagios Alerts :Custom
Posted: Wed Feb 06, 2019 2:00 pm
tried the old google search nothing really comes up. is there a way to get an alert pull data from a different location for info? ex servers info not just IP, service down, name etc
Support for Nagios products and services
https://support.nagios.com/forum/
What type of information are you looking for?LuisN wrote:tried the old google search nothing really comes up. is there a way to get an alert pull data from a different location for info? ex servers info not just IP, service down, name etc
Code: Select all
define command {
command_name notify-host-by-email
command_line /usr/bin/printf "%b" "***** Nagios Monitor XI Alert *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
}Code: Select all
define command {
command_name notify-host-by-email
command_line /path/to/your/custom/handler.sh "$NOTIFICATIONTYPE$" "$HOSTNAME$" "$HOSTSTATE$" "$HOSTADDRESS$" "$HOSTOUTPUT" "$LONGDATETIME$" "$CONTACTEMAIL$"
}Sounds good, locking threadLuisN wrote:Yeah thats how i figured id do it. thanks for the confirmation!