ExtremeManagment alarms with MS Teams/Slack etc.

  • 2
  • Idea
  • Updated 1 year ago
Many years ago there was a NetSight feature called isaac which would post updates to social media. At the time I was rather dismissive of the idea, but now with applications like Slack and Microsoft Teams it seems like the time is right for ExtremeManagement to get integration to send alarms there.
Photo of James A

James A, Embassador

  • 6,542 Points 5k badge 2x thumb

Posted 1 year ago

  • 2
Photo of Johannes Denninger

Johannes Denninger

  • 492 Points 250 badge 2x thumb
You can already add a script to a netsight alarm (right in the alarm settings). With this script and minor changes to the resulting JSON for each platform, you can post to anything that supports incoming webhooks.

Example for Cisco Spark: 
https://gist.github.com/joxz/39f597ae7b8876e2362fbcd204db7a10
Photo of James A

James A, Embassador

  • 6,542 Points 5k badge 2x thumb
Excellent. I customised my script a bit, so you can split the title and body with ^^^ in the alarm notification:
#!/bin/bash
title=$1
shift
while (( $# )); do
if [[ $1 == '^^^' ]]; then
shift
break
fi
title="$title $1"
shift
done

request_body=$(cat <<EOF
{
"title": "$title",
"text" : "$*"
}
EOF
)

/usr/bin/curl -H "Content-Type: application/json" -d "$request_body" https://outlook.office.com/webhook/