Skip to content

Instantly share code, notes, and snippets.

@sgr
Created March 5, 2018 19:09
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 sgr/c33cb5364ccf2ca1682cfff2596b446b to your computer and use it in GitHub Desktop.
Save sgr/c33cb5364ccf2ca1682cfff2596b446b to your computer and use it in GitHub Desktop.
Azure Logic App で Azure メトリックアラートを Slack に投稿する ref: https://qiita.com/sgr@github/items/b79405f952b8de8987a4
{
"properties": {
"context": {
"properties": {
"condition": {
"properties": {
"metricName": {
"type": "string"
},
"metricUnit": {
"type": "string"
},
"metricValue": {
"type": "string"
},
"operator": {
"type": "string"
},
"threshold": {
"type": "string"
},
"timeAggregation": {
"type": "string"
},
"windowSize": {
"type": "string"
}
},
"type": "object"
},
"conditionType": {
"type": "string"
},
"description": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"portalLink": {
"type": "string"
},
"resourceGroupName": {
"type": "string"
},
"resourceId": {
"type": "string"
},
"resourceName": {
"type": "string"
},
"resourceRegion": {
"type": "string"
},
"resourceType": {
"type": "string"
},
"subscriptionId": {
"type": "string"
},
"timestamp": {
"type": "string"
}
},
"type": "object"
},
"properties": {
"properties": {
"$type": {
"type": "string"
}
},
"type": "object"
},
"status": {
"type": "string"
}
},
"type": "object"
}
@{triggerBody()?['context']?['description']}
@{triggerBody()?['context']?['condition']?['metricName']} was @{triggerBody()?['context']?['condition']?['metricValue']} @{triggerBody()?['context']?['condition']?['operator']} @{triggerBody()?['context']?['condition']?['threshold']} (@{triggerBody()?['context']?['condition']?['metricUnit']})
@{triggerBody()?['context']?['portalLink']}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment