repos / ops

infra for pico services
git clone https://github.com/picosh/ops.git

commit
5d351f6
parent
7c550a1
author
Antonio Mika
date
2024-08-27 03:19:11 +0000 UTC
Add network
1 files changed,  +127, -13
M monitoring/grafana/config/provisioning/dashboards/tuns.json
+127, -13
  1@@ -18,10 +18,124 @@
  2   "editable": true,
  3   "fiscalYearStartMonth": 0,
  4   "graphTooltip": 0,
  5-  "id": 16,
  6   "links": [],
  7   "liveNow": false,
  8   "panels": [
  9+    {
 10+      "datasource": {
 11+        "type": "prometheus",
 12+        "uid": "PBFA97CFB590B2093"
 13+      },
 14+      "fieldConfig": {
 15+        "defaults": {
 16+          "color": {
 17+            "mode": "palette-classic"
 18+          },
 19+          "custom": {
 20+            "axisBorderShow": false,
 21+            "axisCenteredZero": false,
 22+            "axisColorMode": "text",
 23+            "axisLabel": "",
 24+            "axisPlacement": "auto",
 25+            "barAlignment": 0,
 26+            "drawStyle": "line",
 27+            "fillOpacity": 0,
 28+            "gradientMode": "none",
 29+            "hideFrom": {
 30+              "legend": false,
 31+              "tooltip": false,
 32+              "viz": false
 33+            },
 34+            "insertNulls": false,
 35+            "lineInterpolation": "linear",
 36+            "lineWidth": 1,
 37+            "pointSize": 5,
 38+            "scaleDistribution": {
 39+              "type": "linear"
 40+            },
 41+            "showPoints": "auto",
 42+            "spanNulls": false,
 43+            "stacking": {
 44+              "group": "A",
 45+              "mode": "none"
 46+            },
 47+            "thresholdsStyle": {
 48+              "mode": "off"
 49+            }
 50+          },
 51+          "mappings": [],
 52+          "thresholds": {
 53+            "mode": "absolute",
 54+            "steps": [
 55+              {
 56+                "color": "green",
 57+                "value": null
 58+              },
 59+              {
 60+                "color": "red",
 61+                "value": 80
 62+              }
 63+            ]
 64+          },
 65+          "unit": "bytes"
 66+        },
 67+        "overrides": []
 68+      },
 69+      "gridPos": {
 70+        "h": 5,
 71+        "w": 24,
 72+        "x": 0,
 73+        "y": 0
 74+      },
 75+      "id": 9,
 76+      "options": {
 77+        "legend": {
 78+          "calcs": [
 79+            "min",
 80+            "max",
 81+            "mean"
 82+          ],
 83+          "displayMode": "table",
 84+          "placement": "bottom",
 85+          "showLegend": true,
 86+          "sortBy": "Mean",
 87+          "sortDesc": true
 88+        },
 89+        "tooltip": {
 90+          "mode": "single",
 91+          "sort": "none"
 92+        }
 93+      },
 94+      "targets": [
 95+        {
 96+          "datasource": {
 97+            "type": "prometheus",
 98+            "uid": "PBFA97CFB590B2093"
 99+          },
100+          "editorMode": "code",
101+          "expr": "rate(process_network_receive_bytes_total{job=\"tuns\"}[$__rate_interval])",
102+          "instant": false,
103+          "legendFormat": "RX",
104+          "range": true,
105+          "refId": "A"
106+        },
107+        {
108+          "datasource": {
109+            "type": "prometheus",
110+            "uid": "PBFA97CFB590B2093"
111+          },
112+          "editorMode": "code",
113+          "expr": "rate(process_network_transmit_bytes_total{job=\"tuns\"}[$__rate_interval])",
114+          "hide": false,
115+          "instant": false,
116+          "legendFormat": "TX",
117+          "range": true,
118+          "refId": "B"
119+        }
120+      ],
121+      "title": "Network Usage",
122+      "type": "timeseries"
123+    },
124     {
125       "datasource": {
126         "type": "prometheus",
127@@ -86,7 +200,7 @@
128         "h": 8,
129         "w": 12,
130         "x": 0,
131-        "y": 0
132+        "y": 5
133       },
134       "id": 7,
135       "options": {
136@@ -114,7 +228,7 @@
137             "uid": "PBFA97CFB590B2093"
138           },
139           "editorMode": "code",
140-          "expr": "rate(process_cpu_seconds_total{job=\"tuns\"}[1m])",
141+          "expr": "rate(process_cpu_seconds_total{job=\"tuns\"}[$__rate_interval])",
142           "instant": false,
143           "legendFormat": "CPU Usage",
144           "range": true,
145@@ -188,7 +302,7 @@
146         "h": 8,
147         "w": 12,
148         "x": 12,
149-        "y": 0
150+        "y": 5
151       },
152       "id": 6,
153       "options": {
154@@ -290,7 +404,7 @@
155         "h": 8,
156         "w": 12,
157         "x": 0,
158-        "y": 8
159+        "y": 13
160       },
161       "id": 5,
162       "options": {
163@@ -392,7 +506,7 @@
164         "h": 8,
165         "w": 12,
166         "x": 12,
167-        "y": 8
168+        "y": 13
169       },
170       "id": 4,
171       "options": {
172@@ -493,7 +607,7 @@
173         "h": 8,
174         "w": 12,
175         "x": 0,
176-        "y": 16
177+        "y": 21
178       },
179       "id": 1,
180       "options": {
181@@ -595,7 +709,7 @@
182         "h": 8,
183         "w": 12,
184         "x": 12,
185-        "y": 16
186+        "y": 21
187       },
188       "id": 3,
189       "options": {
190@@ -696,7 +810,7 @@
191         "h": 8,
192         "w": 12,
193         "x": 0,
194-        "y": 24
195+        "y": 29
196       },
197       "id": 2,
198       "options": {
199@@ -812,7 +926,7 @@
200         "h": 8,
201         "w": 12,
202         "x": 12,
203-        "y": 24
204+        "y": 29
205       },
206       "id": 8,
207       "options": {
208@@ -875,20 +989,20 @@
209       "type": "table"
210     }
211   ],
212-  "refresh": "",
213+  "refresh": "5s",
214   "schemaVersion": 38,
215   "tags": [],
216   "templating": {
217     "list": []
218   },
219   "time": {
220-    "from": "now-6h",
221+    "from": "now-15m",
222     "to": "now"
223   },
224   "timepicker": {},
225   "timezone": "",
226   "title": "Tuns",
227   "uid": "a7431274-1d2e-4568-a48c-efc45628c484",
228-  "version": 2,
229+  "version": 3,
230   "weekStart": ""
231 }