#!/bin/sh

echo "Sending xMatters service notification."
curl -i \
-H "Content-Type: application/json" \
-X POST -d '{"address":"'"$ADDRESS"'","hostName":"'"$HOSTNAME"'","lastServiceStateChange":"'"$LASTSERVICESTATECHANGE"'","notificationAuthor":"'"$NOTIFICATIONAUTHOR"'","notificationComment":"'"$NOTIFICATIONCOMMENT"'","notificationType":"'"$NOTIFICATIONTYPE"'","serviceDisplayName":"'"$SERVICEDISPLAYNAME"'","serviceName":"'"$SERVICENAME"'","serviceOutput":"'"$SERVICEOUTPUT"'","serviceState":"'"$SERVICESTATE"'","serviceStateType":"'"$SERVICESTATETYPE"'","shortDateTime":"'"$SHORTDATETIME"'"}' \
"$XM_INTEGRATION_URL"