惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Schneier on Security
F
Fortinet All Blogs
博客园_首页
The GitHub Blog
The GitHub Blog
V
Visual Studio Blog
D
DataBreaches.Net
aimingoo的专栏
aimingoo的专栏
爱范儿
爱范儿
B
Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
N
Netflix TechBlog - Medium
阮一峰的网络日志
阮一峰的网络日志
P
Proofpoint News Feed
D
Docker
Engineering at Meta
Engineering at Meta
大猫的无限游戏
大猫的无限游戏
The Cloudflare Blog
罗磊的独立博客
云风的 BLOG
云风的 BLOG
Microsoft Azure Blog
Microsoft Azure Blog
T
The Exploit Database - CXSecurity.com
博客园 - 三生石上(FineUI控件)
量子位
The Last Watchdog
The Last Watchdog
MyScale Blog
MyScale Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
The Blog of Author Tim Ferriss
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
小众软件
小众软件
Cloudbric
Cloudbric
博客园 - 司徒正美
H
Help Net Security
人人都是产品经理
人人都是产品经理
Application and Cybersecurity Blog
Application and Cybersecurity Blog
L
LangChain Blog
Latest news
Latest news
M
MIT News - Artificial intelligence
T
Threat Research - Cisco Blogs
博客园 - Franky
S
Security Affairs
W
WeLiveSecurity
F
Full Disclosure
Know Your Adversary
Know Your Adversary
Google DeepMind News
Google DeepMind News
The Hacker News
The Hacker News
Cyberwarzone
Cyberwarzone
美团技术团队
PCI Perspectives
PCI Perspectives
C
Check Point Blog
Spread Privacy
Spread Privacy

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
Remetric: find waste in self-hosted Prometheus, Grafana, and Loki
Andrei Taranik · 2026-05-28 · via DEV Community

Self-hosted Prometheus stacks degrade in predictable ways: a label
explosion that quietly doubles TSDB head size, a metric scraped by
every node and queried by none, an alert rule that has not fired in
nine months, a dashboard panel pointing at a metric that was renamed
last quarter. The signals are all there in the existing APIs, but
writing the queries, running them on a schedule, and turning the
answers into actionable fixes is enough friction that nobody does it
until something breaks.

Remetric is a single static binary that does this. v0.1 has already shipped.

The four waste patterns

Remetric ships five analyzers covering four categories of waste.

Cardinality explosion. A label with high uniqueness produces one
series per value. A trace_id label on a request counter generates a
new series for every request and never reuses any of them. Within
hours a single metric can carry hundreds of thousands of dead series,
consuming TSDB head memory and slowing every query that touches it.
Remetric ranks labels by uniqueness ratio and series-count
contribution, flags hot labels, and produces a fix snippet that drops
the offending label via metric_relabel_configs.

Unused metrics. Exporters scrape thousands of metric names.
Dashboards, alerting rules, and recording rules reference a subset.
The leftover is dead weight in head series. Remetric walks every
Grafana dashboard and every Prometheus rule expression, collects the
set of referenced metric names, diffs against the ingested set, and
emits one finding per unused metric. The fix is a
metric_relabel_configs drop rule per metric.

Alert hygiene. Two failure modes: alerting rules that fire
constantly (noise that everyone scrolls past) and rules that have
never fired in the available retention window (broken? threshold
wrong? failure mode no longer present?). Both need a human decision,
but neither announces itself. Remetric queries rule history and
surfaces rules in each state with lookback window and observed
fire-count as evidence.

Broken panels. Panel queries that reference metrics no longer in
head series or in recording-rule outputs. The panel renders empty;
nobody notices, because empty looks the same as fine. Remetric parses
every PromQL target across every dashboard, diffs against the
existence set (head series union recording-rule outputs), and emits
one finding per (dashboard, missing-metric) pair listing the
affected panels.

None of these are exotic. All are detectable from Prometheus and
Grafana HTTP APIs. The PromQL queries for each have been folklore for
years; the value is in running them on a schedule and producing
actionable findings instead of more PromQL to maintain.

Why a separate tool

The detection logic exists scattered across blog posts, gists, and
pinned Slack messages. Per-backend tools (cortex-tool, vmctl,
mimirtool) each cover a slice, usually for the backend their vendor
sells. None of them:

  • cross over to Grafana to ask "does anything still use this metric?"
  • check whether alert rules ever fire
  • detect broken panels (which requires walking dashboards and querying head series in one pass)
  • ship as a single static binary that runs in CI without a runtime install

Remetric covers all four patterns plus the Grafana side, with a
read-only contract: it never writes to the target Prometheus or
Grafana, and bounded concurrency (5 in-flight requests by default,
configurable) keeps it from overwhelming the target during a scan.

Does this work for Grafana Cloud?

Yes. Grafana Cloud's Prometheus (hosted Mimir) and Grafana itself
speak the same HTTP APIs as the self-hosted versions, so remetric
runs against them with bearer-token auth:

remetric scan \
  --prometheus    https://prometheus-prod-XX.grafana.net/api/prom \
  --prom-token    "$GRAFANA_CLOUD_PROM_TOKEN" \
  --grafana       https://YOUR-ORG.grafana.net \
  --grafana-token "$GRAFANA_CLOUD_GRAFANA_TOKEN" \
  --prom-max-in-flight 2 --grafana-max-in-flight 2

The lowered concurrency keeps remetric under Grafana Cloud's
per-tenant rate limits during a full scan.

Two of remetric's analyzers overlap with built-in Grafana Cloud
features:

  • Cardinality Management (UI, available on all tiers) shows top metrics and top labels by series count. Same data remetric's cardinality analyzer surfaces, but bound to the UI: no CI integration, no paste-ready fix snippets, no programmatic consumption.
  • Adaptive Metrics (paid tiers) automatically aggregates unused dimensions to reduce cardinality. Conceptually overlaps with remetric's unused-metrics analyzer, but operates as opaque automation: you don't see which labels were dropped or what dashboards rely on them.

What Grafana Cloud's built-ins don't cover:

  • Alert hygiene (never-firing or always-firing rules).
  • Broken panels (queries pointing at metrics that no longer exist).
  • CI integration via --fail-on=critical and exit 3.
  • Auditable, human-reviewed fixes you can land in a PR rather than delegate to an automation.

For Grafana Cloud users, remetric is most useful at those gaps:
alert hygiene, broken panels, and getting label-by-label
explanations of what's driving the bill, instead of just "Adaptive
Metrics handled it."

What you get per finding

Each finding carries:

  • A class slug: hot-label, unused-metric, never-firing-alert, always-firing-alert, label-pattern-overly-granular, broken-panel.
  • A severity (critical / high / medium / low) derived from observed series counts, uniqueness ratios, and lookback windows.
  • Evidence: sample values, series counts, affected panel titles.
  • A paste-ready fix snippet: YAML for prometheus.yml when the fix is a scrape-config change, an instruction block when the fix is editing a Grafana dashboard.
  • A documentation URL pointing at remetric.dev/findings/<class> with the canonical write-up: what the pattern is, why it matters, how remetric detects it, known false positives, how to fix.

The fix snippet is the load-bearing part. Every finding answers "now
what?" with copy-pasteable text, not "consider reducing cardinality"
advice.

Running a scan

remetric scan demo

remetric scan --prometheus http://localhost:9090 --grafana http://localhost:3000

Five analyzers run in sequence (each logs when it starts and how
long it took, so a hung target or a slow analyzer is visible). The
severity table at the top gives at-a-glance ranking; per-finding
detail blocks below carry evidence and the fix.

For CI integration, swap terminal output for JSON and add a fail-on
threshold:

remetric scan \
  --prometheus http://prom.internal:9090 \
  --grafana    http://grafana.internal:3000 \
  --output     json \
  --fail-on    critical

Exit code 3 on any finding at or above the threshold; default
behavior is exit 0 regardless of findings, so the tool wires into
pipelines without surprise failures.

Known-noise patterns suppress with anchored regex flags:
--ignore-metric "node_.*", --ignore-label "container_label_.*",
--ignore-alert "TestAlert.*", --ignore-dashboard "Legacy .*". The
flags are repeatable; the patterns wrap as ^(<pattern>)$ so
substring matches don't accidentally suppress unrelated findings.

The report subcommand produces the same findings as scan but in
self-contained HTML (--format html) or Markdown (--format markdown)
for PR comments and review distribution.

What's next

v0.1 ships five analyzers. The post-v0.1 roadmap:

  • Loki support. Logs cardinality is its own waste category; the API surface is parallel enough that existing client patterns transfer cleanly.
  • Recording-rule suggestions. If three dashboards each compute the same expensive aggregation on every refresh, that aggregation is a recording rule waiting to be promoted. The analyzer would surface the candidates.
  • Snapshot diff. remetric scan --baseline=last-week.json to surface regressions over time, not just absolute state. Cardinality drift is the obvious target.
  • VictoriaMetrics, Mimir, Thanos extended support. Basic VM support already works (the Prometheus API path is shared); deeper integration would unlock backend-specific signals.

Further out: a plugin system for custom analyzers (so teams can
codify their own anti-patterns) and a parallel continuous-monitoring
SaaS layer with alerts on cardinality spikes, multi-cluster views,
and historical trends.

Get started

# One-liner install (drops to $HOME/.local/bin)
curl -sSL https://remetric.dev/install.sh | sh

# Homebrew (macOS or Linux)
brew install remetric-dev/tap/remetric

# Docker (linux/amd64, linux/arm64)
docker run --rm ghcr.io/remetric-dev/remetric:latest \
  scan --prometheus http://host.docker.internal:9090

Documentation at remetric.dev. Source and
issues at github.com/remetric-dev/remetric.

Feedback on production scans is the most useful input for the v0.2
roadmap: what the tool caught, what it missed, what it
false-positived. Open a GitHub issue with a redacted output snippet
and the rough shape of the stack.