Skip to content

Instantly share code, notes, and snippets.

@discoposse
Last active July 17, 2017 17:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save discoposse/64fc8f70e419a953182e270f32647dfd to your computer and use it in GitHub Desktop.
Save discoposse/64fc8f70e419a953182e270f32647dfd to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# Slack Webhook notification for Turbonomic Action Scripts
#
# Use cURL to post to the Slack API
curl -X POST --data-urlencode 'payload={"channel": "#turbonomic", "username": "discohook", "text": "Move action created for "$VMT_TARGET_NAME" from "$VMT_CURRENT_NAME" to "$VMT_NEW_NAME" with action name = "$VMT_ACTION_NAME"", "icon_emoji": ":bear:"}' https://hooks.slack.com/services/YOURDEDICATEDWEBHOOKURL
# Log locally in the same folder as the action script (optional)
echo "$VMT_TARGET_NAME is moving" >> mylog.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment