[pull] master from Ehco1996:master#317
Merged
Merged
Conversation
* metrics: drop node_exporter + self-scrape pipeline
Node stats are now sampled directly via gopsutil/v4 in a tiny
internal/cmgr/sampler package; rule stats stay backed by the existing
prometheus client_golang collectors but read in-process via
DefaultGatherer.Gather() instead of an HTTP self-scrape + expfmt parse.
The xray bandwidth recorder, which used to GET /metrics for
node_network_*_bytes_total, also moves to gopsutil.
Removed:
- pkg/metric_reader/ (HTTP scraper + expfmt parser)
- prometheus/node_exporter dep + transitive baggage (kingpin, btrfs,
qdisc, dbus, ...)
- internal/metrics/{node_linux,node_darwin,log_level}.go
- cmgr.Config.{MetricsURL,ApiToken}; relay no longer plumbs them
- config.GetMetricURL
Added:
- github.com/shirou/gopsutil/v4
- internal/cmgr/sampler with NodeSampler (gopsutil) and RuleSampler
(DefaultGatherer.Gather)
Persisted NodeMetrics / RuleMetrics shapes are unchanged, so
cmgr/ms/handler.go and the dashboard contracts keep working.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* metrics: rip out per-rule metrics feature pending rewrite
The current rule-metrics implementation (nested 7-map RuleMetrics, ping-
keyed iteration that silently drops rows when EnablePing=false, parallel
maps that immediately get unpacked again at INSERT time) is too crufty
to keep alive. Removing it from this PR — node sampling stays — and
rebuilding from scratch on top of a flat row shape is the plan.
Removed (backend):
- internal/cmgr/sampler/rule.go (RuleSampler + map nesting)
- sampler.RuleMetrics, sampler.PingMetric
- ms.AddRuleMetric, ms.QueryRuleMetric and the rule_metrics table
(DROP TABLE IF EXISTS in initDB so upgraded nodes don't carry stale
pages)
- ms.ruleRows, MaintenanceResult.RuleDeleted, DBHealth.RuleMetricsRows /
LastRuleWriteTs
- /api/v1/rule_metrics/ route + GetRuleMetrics handler
- cmgr.QueryRuleMetrics interface entry
Removed (frontend):
- api.ruleMetrics, RuleMetric / QueryRuleMetricsResp types
- DBHealth.rule_metrics_rows / last_rule_write_ts, MaintenanceResult
.rule_deleted
- Rules.tsx history sparkline + tcp xfer / conns / ping columns;
reduced to label / listen / type / remote / probe (static config view)
- Settings storage card's rule_metrics + last rule write rows
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ime (#454) Nightly uses a rolling tag (v1.1.7-next), so version-string equality made `Check` and `Apply` short-circuit to "already up to date" even after a fresh nightly was published. Both ldflag paths (goreleaser and Makefile) inject BuildTime, so compare release.published_at against the local BuildTime when versions match. Stable channel is unaffected since its tags don't roll. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )