Last active
July 17, 2017 17:43
-
-
Save discoposse/64fc8f70e419a953182e270f32647dfd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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