Hi,
I have this Nagios notification command which I would like to convert to icinga:
This is the original command:
## 'notify-host-by-sms' command definition
define command {
command_name notify-host-by-sms
command_line /usr/bin/printf "%b" "**Nagios**\n\nNotification Type: \
$NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: \
$HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | \
/usr/local/bin/sms_nagios.pl $CONTACTEMAIL$ \
"** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **"
}
And this is my attempt to convert it but I fear I have gone wrong somewhere
## 'notify-host-by-sms' command definition
object NotificationComman "notify-host-by-sms" {
command = [ /usr/local/bin/sms_nagios.pl $CONTACTEMAIL$ "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" ]
env = { /usr/bin/printf "%b" "**Nagios**\n\n
NOTIFICATIONTYPE = "$NOTIFICATIONTYPE$"
HOSTALIAS = "host.display_name$"
STATE = "$HOSTSTATE$"
HOSTADDRESS = "$HOSTADDRESS$"
INFO = "$HOSTOUTPUT$"
DATE/TIME = "$LONGDATETIME$"
}
}
Any help would be great