From e72f443144a02d6ff45c88ff77a6ec4079f33196 Mon Sep 17 00:00:00 2001 From: PrincessPi3 Date: Wed, 29 Oct 2025 22:37:31 -0600 Subject: [PATCH] WORKAN WOOOO --- Garfana-Visualization.json | 254 ++++++------------ conf-level-debug/telegraf.conf | 2 +- conf-level-info/chrony.conf | 3 + conf-level-info/telegraf.conf | 2 +- .../conf-level-warn}/50-tty.rules | 0 .../conf-level-warn}/boot-firmware-config.txt | 0 .../conf-level-warn}/chrony.conf | 0 {conf-level-warn => old/conf-level-warn}/gpsd | 0 .../conf-level-warn}/grafana.ini | 0 .../conf-level-warn}/hwclock-set | 0 .../conf-level-warn}/influxdb.conf | 0 .../conf-level-warn}/root-crontab | 0 .../conf-level-warn}/sudoers | 0 .../conf-level-warn}/telegraf.conf | 0 14 files changed, 86 insertions(+), 175 deletions(-) rename {conf-level-warn => old/conf-level-warn}/50-tty.rules (100%) rename {conf-level-warn => old/conf-level-warn}/boot-firmware-config.txt (100%) rename {conf-level-warn => old/conf-level-warn}/chrony.conf (100%) rename {conf-level-warn => old/conf-level-warn}/gpsd (100%) rename {conf-level-warn => old/conf-level-warn}/grafana.ini (100%) rename {conf-level-warn => old/conf-level-warn}/hwclock-set (100%) rename {conf-level-warn => old/conf-level-warn}/influxdb.conf (100%) rename {conf-level-warn => old/conf-level-warn}/root-crontab (100%) rename {conf-level-warn => old/conf-level-warn}/sudoers (100%) rename {conf-level-warn => old/conf-level-warn}/telegraf.conf (100%) diff --git a/Garfana-Visualization.json b/Garfana-Visualization.json index cf77949..cec976e 100644 --- a/Garfana-Visualization.json +++ b/Garfana-Visualization.json @@ -91,12 +91,6 @@ "system_time" ], "type": "field" - }, - { - "params": [ - " / 1000000" - ], - "type": "math" } ] ], @@ -234,33 +228,50 @@ }, { "datasource": { - "type": "influxdb", - "uid": "ff2k44t741udcc" + "type": "datasource", + "uid": "grafana" }, - "description": "System Time (Seconds) | Offset Time (Seconds)", + "description": "Long term average of time offset", "fieldConfig": { "defaults": { "color": { - "mode": "thresholds" + "mode": "palette-classic-by-name" }, "custom": { - "align": "left", - "cellOptions": { - "type": "auto" + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false }, - "filterable": true, - "footer": { - "reducers": [ - "mean" - ] + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" }, - "inspect": true, - "tooltip": { - "field": "system_time" + "showPoints": "auto", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" }, - "wrapHeaderText": false, - "wrapText": false + "thresholdsStyle": { + "mode": "off" + } }, + "displayName": "RMS Offset (Seconds)", "mappings": [], "thresholds": { "mode": "absolute", @@ -268,6 +279,10 @@ { "color": "green", "value": 0 + }, + { + "color": "red", + "value": 80 } ] }, @@ -281,42 +296,66 @@ "x": 0, "y": 8 }, - "id": 7, + "id": 5, "options": { - "cellHeight": "sm", - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Time" - } - ] + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } }, "pluginVersion": "12.2.1", "targets": [ { - "groupBy": [], - "limit": "10", + "datasource": { + "type": "influxdb", + "uid": "cenh879ru0gzkc" + }, + "groupBy": [ + { + "params": [ + "1m" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "hide": false, "measurement": "chrony", - "orderByTime": "DESC", - "policy": "default", + "orderByTime": "ASC", + "policy": "autogen", "refId": "A", - "resultFormat": "table", + "resultFormat": "time_series", "select": [ [ { "params": [ - "system_time" + "rms_offset" ], "type": "field" + }, + { + "params": [], + "type": "mean" } ] ], "tags": [] } ], - "title": "System Time | Offset", - "type": "table" + "title": "RMS Offset", + "type": "timeseries" }, { "datasource": { @@ -444,137 +483,6 @@ "title": "Frequency Skew (PPM)", "type": "timeseries" }, - { - "datasource": { - "type": "datasource", - "uid": "grafana" - }, - "description": "Long term average of time offset", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic-by-name" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "displayName": "RMS Offset (Seconds)", - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 16 - }, - "id": 5, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "12.2.1", - "targets": [ - { - "datasource": { - "type": "influxdb", - "uid": "cenh879ru0gzkc" - }, - "groupBy": [ - { - "params": [ - "1m" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "hide": false, - "measurement": "chrony", - "orderByTime": "ASC", - "policy": "autogen", - "refId": "A", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "rms_offset" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] - } - ], - "title": "RMS Offset", - "type": "timeseries" - }, { "datasource": { "type": "datasource", @@ -643,7 +551,7 @@ "h": 8, "w": 12, "x": 0, - "y": 24 + "y": 16 }, "id": 4, "options": { @@ -717,5 +625,5 @@ "timezone": "browser", "title": "Chrony", "uid": "69a006d6-ccaa-4e9e-a8ec-6dba0b30fa1e", - "version": 39 + "version": 40 } \ No newline at end of file diff --git a/conf-level-debug/telegraf.conf b/conf-level-debug/telegraf.conf index 03ba957..1230cf7 100644 --- a/conf-level-debug/telegraf.conf +++ b/conf-level-debug/telegraf.conf @@ -12,7 +12,7 @@ debug = true [[inputs.chrony]] - metrics = ["tracking", "measurements", "statistics"] + metrics = ["tracking", "serverstats"] timeout = "3s" [[outputs.influxdb]] diff --git a/conf-level-info/chrony.conf b/conf-level-info/chrony.conf index b388cb1..56fd059 100644 --- a/conf-level-info/chrony.conf +++ b/conf-level-info/chrony.conf @@ -15,6 +15,9 @@ refclock SHM 0 refid NMEA offset 0.000 precision 1e-6 poll 0 filter 3 # trust means we trust this time. the NMEA will be kicked out as false ticker eventually, so we need to trust the combo refclock PPS /dev/pps0 refid PPS lock NMEA offset 0.0 poll 3 trust +# only log statistics +log statistics + # allow local connections to ntp allow 10.0.0.0/24 diff --git a/conf-level-info/telegraf.conf b/conf-level-info/telegraf.conf index 18511e8..dbd47f1 100644 --- a/conf-level-info/telegraf.conf +++ b/conf-level-info/telegraf.conf @@ -12,7 +12,7 @@ # debug = true [[inputs.chrony]] - metrics = ["tracking", "measurements", "statistics"] + metrics = ["tracking", "serverstats"] timeout = "3s" [[outputs.influxdb]] diff --git a/conf-level-warn/50-tty.rules b/old/conf-level-warn/50-tty.rules similarity index 100% rename from conf-level-warn/50-tty.rules rename to old/conf-level-warn/50-tty.rules diff --git a/conf-level-warn/boot-firmware-config.txt b/old/conf-level-warn/boot-firmware-config.txt similarity index 100% rename from conf-level-warn/boot-firmware-config.txt rename to old/conf-level-warn/boot-firmware-config.txt diff --git a/conf-level-warn/chrony.conf b/old/conf-level-warn/chrony.conf similarity index 100% rename from conf-level-warn/chrony.conf rename to old/conf-level-warn/chrony.conf diff --git a/conf-level-warn/gpsd b/old/conf-level-warn/gpsd similarity index 100% rename from conf-level-warn/gpsd rename to old/conf-level-warn/gpsd diff --git a/conf-level-warn/grafana.ini b/old/conf-level-warn/grafana.ini similarity index 100% rename from conf-level-warn/grafana.ini rename to old/conf-level-warn/grafana.ini diff --git a/conf-level-warn/hwclock-set b/old/conf-level-warn/hwclock-set similarity index 100% rename from conf-level-warn/hwclock-set rename to old/conf-level-warn/hwclock-set diff --git a/conf-level-warn/influxdb.conf b/old/conf-level-warn/influxdb.conf similarity index 100% rename from conf-level-warn/influxdb.conf rename to old/conf-level-warn/influxdb.conf diff --git a/conf-level-warn/root-crontab b/old/conf-level-warn/root-crontab similarity index 100% rename from conf-level-warn/root-crontab rename to old/conf-level-warn/root-crontab diff --git a/conf-level-warn/sudoers b/old/conf-level-warn/sudoers similarity index 100% rename from conf-level-warn/sudoers rename to old/conf-level-warn/sudoers diff --git a/conf-level-warn/telegraf.conf b/old/conf-level-warn/telegraf.conf similarity index 100% rename from conf-level-warn/telegraf.conf rename to old/conf-level-warn/telegraf.conf