WORKAN WOOOO

This commit is contained in:
2025-10-29 22:37:31 -06:00
parent 4960d8aa41
commit e72f443144
14 changed files with 86 additions and 175 deletions
+80 -172
View File
@@ -91,12 +91,6 @@
"system_time" "system_time"
], ],
"type": "field" "type": "field"
},
{
"params": [
" / 1000000"
],
"type": "math"
} }
] ]
], ],
@@ -234,33 +228,50 @@
}, },
{ {
"datasource": { "datasource": {
"type": "influxdb", "type": "datasource",
"uid": "ff2k44t741udcc" "uid": "grafana"
}, },
"description": "System Time (Seconds) | Offset Time (Seconds)", "description": "Long term average of time offset",
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"color": { "color": {
"mode": "thresholds" "mode": "palette-classic-by-name"
}, },
"custom": { "custom": {
"align": "left", "axisBorderShow": false,
"cellOptions": { "axisCenteredZero": false,
"type": "auto" "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, "insertNulls": false,
"footer": { "lineInterpolation": "linear",
"reducers": [ "lineWidth": 1,
"mean" "pointSize": 5,
] "scaleDistribution": {
"type": "linear"
}, },
"inspect": true, "showPoints": "auto",
"tooltip": { "showValues": false,
"field": "system_time" "spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
}, },
"wrapHeaderText": false, "thresholdsStyle": {
"wrapText": false "mode": "off"
}
}, },
"displayName": "RMS Offset (Seconds)",
"mappings": [], "mappings": [],
"thresholds": { "thresholds": {
"mode": "absolute", "mode": "absolute",
@@ -268,6 +279,10 @@
{ {
"color": "green", "color": "green",
"value": 0 "value": 0
},
{
"color": "red",
"value": 80
} }
] ]
}, },
@@ -281,42 +296,66 @@
"x": 0, "x": 0,
"y": 8 "y": 8
}, },
"id": 7, "id": 5,
"options": { "options": {
"cellHeight": "sm", "legend": {
"showHeader": true, "calcs": [],
"sortBy": [ "displayMode": "list",
{ "placement": "bottom",
"desc": true, "showLegend": true
"displayName": "Time" },
"tooltip": {
"hideZeros": false,
"mode": "single",
"sort": "none"
} }
]
}, },
"pluginVersion": "12.2.1", "pluginVersion": "12.2.1",
"targets": [ "targets": [
{ {
"groupBy": [], "datasource": {
"limit": "10", "type": "influxdb",
"uid": "cenh879ru0gzkc"
},
"groupBy": [
{
"params": [
"1m"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"hide": false,
"measurement": "chrony", "measurement": "chrony",
"orderByTime": "DESC", "orderByTime": "ASC",
"policy": "default", "policy": "autogen",
"refId": "A", "refId": "A",
"resultFormat": "table", "resultFormat": "time_series",
"select": [ "select": [
[ [
{ {
"params": [ "params": [
"system_time" "rms_offset"
], ],
"type": "field" "type": "field"
},
{
"params": [],
"type": "mean"
} }
] ]
], ],
"tags": [] "tags": []
} }
], ],
"title": "System Time | Offset", "title": "RMS Offset",
"type": "table" "type": "timeseries"
}, },
{ {
"datasource": { "datasource": {
@@ -444,137 +483,6 @@
"title": "Frequency Skew (PPM)", "title": "Frequency Skew (PPM)",
"type": "timeseries" "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": { "datasource": {
"type": "datasource", "type": "datasource",
@@ -643,7 +551,7 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 0, "x": 0,
"y": 24 "y": 16
}, },
"id": 4, "id": 4,
"options": { "options": {
@@ -717,5 +625,5 @@
"timezone": "browser", "timezone": "browser",
"title": "Chrony", "title": "Chrony",
"uid": "69a006d6-ccaa-4e9e-a8ec-6dba0b30fa1e", "uid": "69a006d6-ccaa-4e9e-a8ec-6dba0b30fa1e",
"version": 39 "version": 40
} }
+1 -1
View File
@@ -12,7 +12,7 @@
debug = true debug = true
[[inputs.chrony]] [[inputs.chrony]]
metrics = ["tracking", "measurements", "statistics"] metrics = ["tracking", "serverstats"]
timeout = "3s" timeout = "3s"
[[outputs.influxdb]] [[outputs.influxdb]]
+3
View File
@@ -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 # 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 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 local connections to ntp
allow 10.0.0.0/24 allow 10.0.0.0/24
+1 -1
View File
@@ -12,7 +12,7 @@
# debug = true # debug = true
[[inputs.chrony]] [[inputs.chrony]]
metrics = ["tracking", "measurements", "statistics"] metrics = ["tracking", "serverstats"]
timeout = "3s" timeout = "3s"
[[outputs.influxdb]] [[outputs.influxdb]]