Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .gitignore
Binary file not shown.
Binary file added UserManualResourceLevelBreakdown.pdf
Binary file not shown.
318 changes: 318 additions & 0 deletions custom_dashboard/grafana_dashboards/Resource Level Breakdown.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,318 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"fillOpacity": 80,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineWidth": 1,
"scaleDistribution": {
"type": "linear"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 10,
"w": 24,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"barRadius": 0,
"barWidth": 0.97,
"fullHighlight": false,
"groupWidth": 0.7,
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"orientation": "auto",
"showValue": "auto",
"stacking": "none",
"tooltip": {
"mode": "single",
"sort": "none"
},
"xField": "resource",
"xTickLabelRotation": 0,
"xTickLabelSpacing": 0
},
"targets": [
{
"datasource": {
"type": "prometheus"
},
"editorMode": "code",
"expr": "topk(5,Resource_Cost_${account}{service=\"$service\", region=\"$region\"})",
"format": "table",
"instant": false,
"legendFormat": "{{resource}}",
"range": true,
"refId": "A"
}
],
"title": "Resource Level Breakdown",
"type": "barchart"
},
{
"datasource": {
"type": "prometheus"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"cellOptions": {
"type": "auto"
},
"inspect": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "resource"
},
"properties": [
{
"id": "custom.width",
"value": 666
}
]
}
]
},
"gridPos": {
"h": 7,
"w": 24,
"x": 0,
"y": 10
},
"id": 2,
"options": {
"cellHeight": "sm",
"footer": {
"countRows": false,
"fields": ["Value"],
"reducer": ["sum"],
"show": true
},
"showHeader": true,
"sortBy": [
{
"desc": true,
"displayName": "Cost($)"
}
]
},
"pluginVersion": "10.0.2",
"targets": [
{
"datasource": {
"type": "prometheus"
},
"editorMode": "code",
"expr": "Resource_Cost_${account}{service=\"$service\", region=\"$region\"}",
"format": "table",
"instant": false,
"legendFormat": "{{resource}}",
"range": true,
"refId": "A"
}
],
"title": "Tabular view",
"transformations": [
{
"id": "organize",
"options": {
"excludeByName": {
"Time": true,
"__name__": true,
"job": true,
"region": true
},
"indexByName": {},
"renameByName": {
"Value": "Cost($)"
}
}
}
],
"type": "table"
}
],
"refresh": "",
"schemaVersion": 38,
"style": "dark",
"tags": [],
"templating": {
"list": [
{
"current": {
"selected": true,
"text": "ap-southeast-2",
"value": "ap-southeast-2"
},
"datasource": {
"type": "prometheus"
},
"definition": "query_result(top_service_cost)",
"hide": 0,
"includeAll": false,
"label": "region",
"multi": false,
"name": "region",
"options": [],
"query": {
"query": "query_result(top_service_cost)",
"refId": "PrometheusVariableQueryEditor-VariableQuery"
},
"refresh": 1,
"regex": "/region=\"(?<text>[^\"]+)/g",
"skipUrlSync": false,
"sort": 0,
"type": "query"
},
{
"current": {
"selected": true,
"text": "Ec2",
"value": "Ec2"
},
"datasource": {
"type": "prometheus"
},
"definition": "query_result(top_service_cost{region=\"$region\"})",
"hide": 0,
"includeAll": false,
"label": "service",
"multi": false,
"name": "service",
"options": [],
"query": {
"query": "query_result(top_service_cost{region=\"$region\"})",
"refId": "PrometheusVariableQueryEditor-VariableQuery"
},
"refresh": 1,
"regex": "/service=\"(?<text>[^\"]+)/g",
"skipUrlSync": false,
"sort": 0,
"type": "query"
},
{
"current": {
"selected": true,
"text": "212146601504",
"value": "212146601504"
},
"datasource": {
"type": "prometheus"
},
"definition": "query_result(top_service_cost)",
"hide": 0,
"includeAll": false,
"label": "account",
"multi": false,
"name": "account",
"options": [],
"query": {
"query": "query_result(top_service_cost)",
"refId": "PrometheusVariableQueryEditor-VariableQuery"
},
"refresh": 1,
"regex": "/account=\"(?<text>[^\"]+)/g",
"skipUrlSync": false,
"sort": 0,
"type": "query"
}
]
},
"time": {
"from": "now",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "Resource Level Breakdown",
"uid": "ff3be7e8-f294-4134-966d-33868b4b59f3",
"version": 1,
"weekStart": ""
}
Loading