Created
November 10, 2025 15:36
-
-
Save dtolj/2e78b4b8c8ad3e46125e6f42c32c2b70 to your computer and use it in GitHub Desktop.
AdaptiveCard
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
| { | |
| "type": "AdaptiveCard", | |
| "body": [ | |
| { | |
| "type": "ColumnSet", | |
| "columns": [ | |
| { | |
| "type": "Column", | |
| "width": "auto", | |
| "items": [ | |
| { | |
| "type": "Image", | |
| "url": "@{if(equals(body('Parse_JSON')?['status'], 'firing'), 'https://img.icons8.com/color/48/000000/warning-shield.png', 'https://img.icons8.com/color/48/000000/ok.png')}", | |
| "size": "Medium", | |
| "height": "32px" | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "Column", | |
| "width": "stretch", | |
| "items": [ | |
| { | |
| "type": "TextBlock", | |
| "text": "@{body('Parse_JSON')?['commonLabels']?['alertname']}", | |
| "weight": "Bolder", | |
| "size": "Large", | |
| "color": "@{if(equals(body('Parse_JSON')?['status'], 'firing'), 'Attention', 'Good')}", | |
| "wrap": true | |
| }, | |
| { | |
| "type": "TextBlock", | |
| "text": "Alert Group: @{coalesce(body('Parse_JSON')?['groupLabels']?['alert_group'], 'N/A')}", | |
| "size": "Small", | |
| "color": "Accent", | |
| "wrap": true, | |
| "isSubtle": true | |
| } | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "Container", | |
| "style": "@{if(equals(body('Parse_JSON')?['status'], 'firing'), 'attention', 'default')}", | |
| "items": [ | |
| { | |
| "type": "TextBlock", | |
| "text": "Total Alerts: @{length(body('Parse_JSON')?['alerts'])}", | |
| "size": "Small", | |
| "weight": "Bolder", | |
| "color": "@{if(equals(body('Parse_JSON')?['status'], 'firing'), 'Attention', 'Good')}" | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "FactSet", | |
| "facts": [ | |
| { | |
| "title": "Environment:", | |
| "value": "@{coalesce(body('Parse_JSON')?['commonLabels']?['environment'], 'N/A')}" | |
| }, | |
| { | |
| "title": "Severity:", | |
| "value": "@{coalesce(body('Parse_JSON')?['commonLabels']?['severity'], 'N/A')}" | |
| }, | |
| { | |
| "title": "Summary:", | |
| "value": "@{coalesce(body('Parse_JSON')?['commonAnnotations']?['summary'], 'N/A')}" | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "Container", | |
| "items": [ | |
| { | |
| "type": "TextBlock", | |
| "text": "**Affected Instances**:", | |
| "weight": "Bolder", | |
| "size": "Medium", | |
| "spacing": "Medium" | |
| }, | |
| { | |
| "type": "FactSet", | |
| "facts": @{outputs('Compose_Instance_Table')} | |
| }, | |
| ], | |
| "spacing": "ExtraSmall" | |
| } | |
| ], | |
| "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", | |
| "version": "1.4" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment