Skip to content

Commit

Permalink
fix_dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
gsanchietti committed Sep 11, 2024
1 parent 9385096 commit cd86eff
Showing 1 changed file with 52 additions and 79 deletions.
131 changes: 52 additions & 79 deletions imageroot/etc/dashboards/network_traffic.json
Original file line number Diff line number Diff line change
@@ -1,53 +1,4 @@
{
"__inputs": [
{
"name": "DS_GRAFANA-POSTGRESQL-DATASOURCE",
"label": "grafana-postgresql-datasource",
"description": "",
"type": "datasource",
"pluginId": "grafana-postgresql-datasource",
"pluginName": "PostgreSQL"
}
],
"__elements": {},
"__requires": [
{
"type": "panel",
"id": "barchart",
"name": "Bar chart",
"version": ""
},
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "10.3.3"
},
{
"type": "datasource",
"id": "grafana-postgresql-datasource",
"name": "PostgreSQL",
"version": "1.0.0"
},
{
"type": "panel",
"id": "piechart",
"name": "Pie chart",
"version": ""
},
{
"type": "panel",
"id": "stat",
"name": "Stat",
"version": ""
},
{
"type": "panel",
"id": "table",
"name": "Table",
"version": ""
}
],
"annotations": {
"list": [
{
Expand All @@ -67,14 +18,15 @@
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": null,
"id": 5,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"default": false,
"type": "grafana-postgresql-datasource",
"uid": "${DS_GRAFANA-POSTGRESQL-DATASOURCE}"
"uid": "${DS_TIMESCALE}"
},
"fieldConfig": {
"defaults": {
Expand All @@ -95,8 +47,7 @@
}
]
},
"unit": "decbytes",
"unitScale": true
"unit": "decbytes"
},
"overrides": []
},
Expand All @@ -112,6 +63,7 @@
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"percentChangeColorMode": "standard",
"reduceOptions": {
"calcs": [
"lastNotNull"
Expand All @@ -123,17 +75,17 @@
"textMode": "auto",
"wideLayout": true
},
"pluginVersion": "10.3.3",
"pluginVersion": "11.2.0",
"targets": [
{
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "${DS_GRAFANA-POSTGRESQL-DATASOURCE}"
"uid": "${DS_TIMESCALE}"
},
"editorMode": "code",
"format": "table",
"rawQuery": true,
"rawSql": "SELECT SUM(bytes)\nFROM dpi_stats\nWHERE $__timeFilter(time)\n",
"rawSql": "SELECT sum(bytes) FROM ca_dpi_stats_hourly_bytes WHERE unit_id=$unitid ",
"refId": "A",
"sql": {
"columns": [
Expand All @@ -159,8 +111,9 @@
},
{
"datasource": {
"default": false,
"type": "grafana-postgresql-datasource",
"uid": "${DS_GRAFANA-POSTGRESQL-DATASOURCE}"
"uid": "${DS_TIMESCALE}"
},
"description": "",
"fieldConfig": {
Expand All @@ -175,8 +128,7 @@
"viz": false
}
},
"mappings": [],
"unitScale": true
"mappings": []
},
"overrides": []
},
Expand All @@ -191,8 +143,11 @@
"displayLabels": [],
"legend": {
"displayMode": "list",
"placement": "bottom",
"showLegend": true
"placement": "right",
"showLegend": true,
"values": [
"value"
]
},
"pieType": "pie",
"reduceOptions": {
Expand All @@ -212,12 +167,12 @@
{
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "${DS_GRAFANA-POSTGRESQL-DATASOURCE}"
"uid": "${DS_TIMESCALE}"
},
"editorMode": "code",
"format": "table",
"rawQuery": true,
"rawSql": "SELECT replace(application, 'netify.', '') as application, SUM(bytes)\nFROM dpi_stats\nWHERE $__timeFilter(time) AND application != ''\nGROUP BY application\n",
"rawSql": "SELECT application, sum(bytes) FROM ca_dpi_stats_hourly_application\nWHERE unit_id=$unitid\nGROUP BY application",
"refId": "A",
"sql": {
"columns": [
Expand Down Expand Up @@ -259,8 +214,7 @@
"viz": false
}
},
"mappings": [],
"unitScale": true
"mappings": []
},
"overrides": []
},
Expand Down Expand Up @@ -370,8 +324,7 @@
}
]
},
"unit": "bytes",
"unitScale": true
"unit": "bytes"
},
"overrides": []
},
Expand Down Expand Up @@ -468,8 +421,7 @@
}
]
},
"unit": "bytes",
"unitScale": true
"unit": "bytes"
},
"overrides": [
{
Expand Down Expand Up @@ -510,7 +462,7 @@
},
"showHeader": true
},
"pluginVersion": "10.3.3",
"pluginVersion": "11.2.0",
"targets": [
{
"datasource": {
Expand Down Expand Up @@ -562,8 +514,7 @@
"viz": false
}
},
"mappings": [],
"unitScale": true
"mappings": []
},
"overrides": []
},
Expand Down Expand Up @@ -826,25 +777,47 @@
"templating": {
"list": [
{
"current": {},
"current": {
"selected": false,
"text": "nethsecurity.nethesis.it (181ff9b0-e2be-4c71-897a-6575e3991a1c)",
"value": "1"
},
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "${DS_GRAFANA-POSTGRESQL-DATASOURCE}"
"uid": "${DS_TIMESCALE}"
},
"definition": "select id as __value, uuid as __text from units",
"definition": "SELECT id AS __value, CONCAT(name,' (',uuid,')') AS __text FROM units",
"description": "",
"hide": 0,
"includeAll": false,
"label": "UnitId",
"label": "Unit",
"multi": false,
"name": "unitid",
"options": [],
"query": "select id as __value, uuid as __text from units",
"query": "SELECT id AS __value, CONCAT(name,' (',uuid,')') AS __text FROM units",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"type": "query"
},
{
"current": {
"selected": true,
"text": "Local Timescale",
"value": "timescale"
},
"hide": 2,
"includeAll": false,
"multi": false,
"name": "DS_TIMESCALE",
"options": [],
"query": "grafana-postgresql-datasource",
"queryValue": "",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"type": "datasource"
}
]
},
Expand All @@ -856,6 +829,6 @@
"timezone": "",
"title": "Network traffic",
"uid": "fe0af3cb-9be0-4b2a-8ccb-86704956cf2e",
"version": 23,
"version": 4,
"weekStart": ""
}
}

0 comments on commit cd86eff

Please sign in to comment.