Skip to content

[pull] master from Ehco1996:master#317

Merged
pull[bot] merged 2 commits into
Kiterepo:masterfrom
Ehco1996:master
May 5, 2026
Merged

[pull] master from Ehco1996:master#317
pull[bot] merged 2 commits into
Kiterepo:masterfrom
Ehco1996:master

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented May 5, 2026

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 : )

Ehco1996 and others added 2 commits May 5, 2026 14:04
* 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>
@pull pull Bot locked and limited conversation to collaborators May 5, 2026
@pull pull Bot added the ⤵️ pull label May 5, 2026
@pull pull Bot merged commit 1e0e74c into Kiterepo:master May 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant