The Simplest Way to Make Longhorn and New Relic Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Running Longhorn and New Relic together helps teams watch block storage health across Kubernetes clusters. Longhorn exposes volume metrics, and New Relic collects this data to trigger storage alerts. This setup gives your team clear views into disk space, replica states, and node pressure. You can spot slow reads or broken volumes before apps crash in production. How Longhorn and New Relic share metrics and permissions Longhorn runs inside your Kubernetes cluster to manage persistent block s

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

Running Longhorn and New Relic together helps teams watch block storage health across Kubernetes clusters. Longhorn exposes volume metrics, and New Relic collects this data to trigger storage alerts.

This setup gives your team clear views into disk space, replica states, and node pressure. You can spot slow reads or broken volumes before apps crash in production.

How Longhorn and New Relic share metrics and permissions

Longhorn runs inside your Kubernetes cluster to manage persistent block storage across your worker nodes. Its manager pods expose standard metrics endpoints that report volume health, disk size, and replica status.

New Relic places an agent inside the same cluster to scrape those storage endpoints on a schedule. The agent reads the raw storage stats and sends them out to the cloud platform.

Two distinct permission sets make this data flow work each day. First, the collector pod needs cluster role permissions to find and read the storage manager pods. Second, the collector needs an ingest key to send metrics over the network to your account.

When both keys and roles align, storage metrics flow into dashboards without manual work. Engineers can then build alerts for degraded volumes, high disk use, or stuck volume mounts.

Common failure modes in storage metric pipelines

Many teams rush the setup and give the metric agent broad cluster admin rights. If an attacker compromises that agent pod, they gain control over every workload in the cluster.

Shared ingest keys cause another big risk for operations teams. Teams often use one master key across dev, staging, and prod clusters to save time. When a key leaks in a test log, rotating it breaks metric flow everywhere at once.

End-to-End Encryption + New Relic Security: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Network paths can also fail silently when teams lock down pod traffic. A strict network rule might block the collector pod from reaching the storage manager port. Dashboards then show flat lines or missing data right when a storage node goes down.

Unlogged dashboard changes create confusion during high stress outages as well. If anyone with a shared login can edit alert rules, someone might silence critical disk warnings.

How to scope roles and network paths

Start by locking down the cluster role bound to your metric collector service account. Grant read-only permissions scoped only to the namespaces and endpoints needed for storage scraping. Never allow the collector service account to create, change, or delete cluster volumes.

Next, create a separate ingest key for each cluster you run. Store that key in a restricted secret that only the collector pod can read. If you need to revoke a dev key, your prod storage alerts stay up and running.

Use Kubernetes network rules to limit traffic inside the storage namespace. Allow inbound scrape traffic to the manager pods only from the specific collector pod labels. Block other app pods from probing the storage manager endpoints directly.

Finally, map dashboard roles to individual team identities instead of using shared admin accounts. Give most engineers view rights on storage charts, and limit alert rule edits to on-call leads. When you mask sensitive fields in logs, rewrite emails or phone numbers before data leaves the node.

Govern statements and responses across databases and APIs

Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev runs beside each supported service as an open-source proxy, a sidecar for your database or API.

First, hoop.dev guardrails block banned queries before they run. Then hoop.dev data masking rewrites matched sensitive values in responses in memory. The audit trail records every statement and verdict per resource. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.

Frequently asked questions

How does New Relic collect metrics from Longhorn?

Longhorn manager pods publish storage metrics on a standard internal endpoint inside the cluster. The New Relic cluster agent scrapes that endpoint and forwards the data using an ingest key.

What permissions does the metric agent need in Kubernetes?

The agent needs a read-only cluster role to discover pods and read metric endpoints. It does not need write permissions on volumes, secrets, or running app workloads.

Why did Longhorn volume metrics stop showing up in dashboards?

Check if a network rule blocked traffic between the collector pod and the storage namespace. Also verify that the ingest key is still valid and the manager pods are running.

The query runs. The emails stay hidden.