#!/bin/bash
# ITOC360 Notification Plugin

curl -s -X POST "https://api.itoc360.app/functions/v1/events?token=$NOTIFY_PARAMETER_1" \
  -H "Content-Type: application/json" \
  -d "{
    \"host\": \"$NOTIFY_HOSTNAME\",
    \"service\": \"$NOTIFY_SERVICEDESC\",
    \"state\": \"$NOTIFY_SERVICESTATE\",
    \"host_state\": \"$NOTIFY_HOSTSTATE\",
    \"notification_type\": \"$NOTIFY_NOTIFICATIONTYPE\",
    \"output\": \"$NOTIFY_SERVICEOUTPUT\",
    \"host_output\": \"$NOTIFY_HOSTOUTPUT\",
    \"severity\": \"$NOTIFY_HOSTSEVERITY\",
    \"timestamp\": \"$NOTIFY_SHORTDATETIME\"
  }"

exit 0
