Skip to content

Instantly share code, notes, and snippets.

@keslerm
Created April 27, 2020 17:38
Show Gist options
  • Save keslerm/1da99237c84df545d9c43e7199028a30 to your computer and use it in GitHub Desktop.
Save keslerm/1da99237c84df545d9c43e7199028a30 to your computer and use it in GitHub Desktop.
// This is for grafana to show the total net usage by vm/container from proxmox from the pvestatd
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"id": null,
"links": [],
"panels": [
{
"columns": [],
"datasource": "Proxmox",
"fontSize": "100%",
"gridPos": {
"h": 18,
"w": 24,
"x": 0,
"y": 0
},
"id": 2,
"options": {},
"pageSize": null,
"pluginVersion": "6.6.2",
"showHeader": true,
"sort": {
"col": 1,
"desc": false
},
"styles": [
{
"alias": "Time",
"align": "auto",
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"pattern": "Time",
"type": "hidden"
},
{
"alias": "",
"align": "right",
"colorMode": null,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"decimals": 2,
"pattern": "/.*/",
"thresholds": [],
"type": "number",
"unit": "decbytes"
}
],
"targets": [
{
"alias": "$tag_host",
"groupBy": [
{
"params": [
"host"
],
"type": "tag"
}
],
"limit": "1",
"measurement": "system",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT last(\"netin\") AS \"netin\", last(\"netout\") AS \"netout\" FROM \"system\" WHERE $timeFilter GROUP BY \"host\" LIMIT 1",
"rawQuery": true,
"refId": "A",
"resultFormat": "table",
"select": [
[
{
"params": [
"netin"
],
"type": "field"
},
{
"params": [],
"type": "last"
},
{
"params": [
"netin"
],
"type": "alias"
}
],
[
{
"params": [
"netout"
],
"type": "field"
},
{
"params": [],
"type": "last"
},
{
"params": [
"netout"
],
"type": "alias"
}
]
],
"tags": []
}
],
"timeFrom": null,
"timeShift": null,
"title": "Net In",
"transform": "table",
"type": "table"
}
],
"schemaVersion": 22,
"style": "dark",
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
]
},
"timezone": "",
"title": "New dashboard",
"uid": null,
"version": 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment