Monitoring Loki itself: meta-monitoring setup

Run a separate Prometheus and Grafana stack to watch Loki's own metrics, so a broken cluster can be debugged from a working one. Covers scrape setup, cardinality and what to confirm before you rely on it.

On this page

Why Loki meta-monitoring matters when the cluster is failing

A separate Prometheus and Grafana stack, scraping Loki's own metrics from each component's /metrics endpoint, lets you debug a failing Loki cluster from a working one. The problem it solves is circular. When pushes start failing or queries time out, the dashboards and alert rules you would normally open are often stored and evaluated inside the same cluster that is broken, so they either show nothing or show gaps at the exact moment you need them. Grafana recommends collecting data about Loki in a separate instance of Loki, Prometheus and Grafana for this reason, and the Loki meta-monitoring documentation describes the pattern. Each Loki component, whether distributor, ingester, querier or query frontend, exposes Prometheus metrics, so the monitoring stack needs network reach to every component and its own storage that does not depend on the cluster under observation.

Teams need this before the first serious incident, not during it. It matters most when you run more than one component on separate hosts or in Kubernetes, when you rely on Loki alerts to page people, and when ingestion errors such as rejected pushes or failed chunk writes would otherwise go unnoticed until someone searches for a missing log line. Confirm with your own platform team where the monitoring stack will run, which failure domain it shares with Loki, and who gets paged if the monitoring stack itself goes quiet. Those answers decide whether the setup is actually independent.

Metrics are only half of the picture. Collecting Loki's own container logs is a separate path that the metrics stack does not give you, and it needs its own shipper and destination, which should also sit outside the cluster. Before you build either, confirm the retention you need for the meta-monitoring data, who can read it, and how you will verify that a deliberately broken component shows up in the separate stack within your alerting window.

How Loki metrics reach a separate watcher stack

The diagram starts at the production Loki components, each of which exposes Prometheus metrics at /metrics. A Prometheus server in a separate watcher stack scrapes those endpoints and sends alerts to Alertmanager, while a separate Grafana reads from that Prometheus. The watcher stack and its storage sit outside the Loki cluster's trust boundary and do not share the Loki object store or gateway. Check that the watcher can still reach the Loki endpoints when the Loki cluster is degraded.

Loki metrics flow to a separate Prometheus, Alertmanager and Grafana, with separate storage.

Why the watcher must run outside the cluster it watches

The watcher must not depend on the failure domain it observes. If the Loki cluster fails because a storage backend, network segment or Kubernetes control plane goes down, a monitoring stack that shares those dependencies goes down with it, and the team loses the one view it needs. Grafana's guidance for Loki is to collect data about Loki in a separate Loki, Prometheus and Grafana instance, so a broken cluster can be troubleshot from a working one. Each Loki component exposes Prometheus metrics at /metrics, which gives the separate stack something to scrape. Before building anything, decide where the meta-monitoring stack runs, which cloud account, cluster or host it lives on, and who can reach it during an outage. Confirm that it has no path back through the Loki object store or the Loki query frontend.

Prometheus is the piece that most often gets this wrong. Its local storage is not clustered or replicated, so it should be managed like any other single-node database, with its own disk sizing, backups and restart procedure. Its default retention is 15 days, and the retention can be set by time or by size, so decide how much history you need for post-incident analysis and size the volume to match. For longer history, remote write can send samples to an external long-term storage system, but that system then becomes another dependency to place outside the failure domain. Grafana in the same stack needs a MySQL or PostgreSQL database for high availability, because its default SQLite store does not scale for production, so the database also needs a location that survives a Loki outage.

Prometheus values reliability over precision, which the project's documentation states plainly, and this shapes how you design meta-monitoring alerts. Samples can be delayed or missed during scrape failures, so an alert that depends on an exact count of Loki errors may fire late or not at all. Build alerts on sustained conditions, such as a component that stops answering scrapes, rather than on single data points, and test each one by stopping the component on purpose in a non-production cluster. Confirm the scrape interval, evaluation interval and alert for durations with your team before you rely on them, because they decide how quickly you learn about a failure.

Which meta-monitoring setup fits your team

This table compares the main choices for the watcher stack that observes your Loki cluster, from where it runs to how Prometheus, Grafana, Alertmanager and scrape configuration are set up. Read each row for when the option fits, what it costs in operational effort and what you must confirm before you commit. The main takeaway is that the watcher should fail independently of the cluster it watches, so placement matters more than size.

ChoiceWhen it fitsTrade-off and what to confirm
Watcher location: second cluster or separate VMsYour Loki cluster runs on Kubernetes and you can keep a second, independent cluster or a small set of virtual machines outside its failure domain.A second cluster adds upkeep for a second control plane. Separate VMs are simpler but need their own patching and backups. Confirm that the watcher shares no storage, network path or identity provider with the Loki cluster.
Prometheus: single instanceMetric volume from Loki is modest and a short local retention window meets your debugging needs.Grafana's guidance is to keep a separate Loki, Prometheus and Grafana, but a single Prometheus is a single node. Local storage is not clustered or replicated, so plan backups and restarts. The default local retention is 15 days (Prometheus storage docs).
Prometheus: with remote write to long-term storageYou need metrics kept longer than local retention, or you want history from the watcher to survive a watcher node failure.Remote write adds a second system to run and a storage cost that grows with series count. Confirm the destination's retention terms and how you will query it during a Loki incident.
Grafana: single nodeFew operators use the watcher dashboards and the outage impact of a short restart is acceptable.A single node is quick to deploy but unavailable during upgrades or failure. Grafana's own guidance points to a database other than SQLite for production. Confirm which database backs it.
Grafana: two or more active-active nodesOperators need dashboards during a Loki outage and you accept shared database and load balancer work.Grafana's high availability setup needs a MySQL or PostgreSQL database and a load balancer. Alerting needs extra configuration to avoid duplicate notifications, and Grafana Live has HA limits.
Alertmanager: single instanceYour team has one on-call route and you want the simplest alert delivery path for watcher alerts.A single instance stops notifying if it fails. Alerts about Loki can then go silent at the moment they matter most. Confirm a second notification channel for the watcher itself.
Alertmanager: clusteredWatcher alerts must keep flowing during node failures and your team pages from them.Clustering uses the --cluster flags. Prometheus should point at every Alertmanager instance rather than a load balancer (Alertmanager docs). Confirm the cluster peers can reach each other on the watcher network.
Kubernetes Monitoring Helm chartLoki and the watcher run on Kubernetes and you want discovery, scrape jobs and dashboards installed from one chart.Fast to start, but chart defaults can collect more series than you need. Review label sets and cardinality before turning on every target. Confirm chart version compatibility with your Loki release.
Hand-written scrape configurationYou run Loki on virtual machines or need exact control over scrape jobs, relabeling and series limits.More effort to write and maintain, and every Loki component needs an explicit target. Each Loki component exposes Prometheus metrics at /metrics, so confirm the full target list after every Loki upgrade.

How Loki metrics cardinality can overload the watcher

The stack watching Loki produces its own time series, and that count can grow faster than expected. The cards below cover the places where series multiply, from scrape configuration to upgrades, and the configuration choice that keeps each one in check.

Per-pod labels from scrape configuration

Kubernetes service discovery attaches labels such as pod name, container ID and replica set to every target. Each new pod creates a fresh set of series for every Loki metric, so churn from frequent rollouts or autoscaling inflates the count over time. Check which discovery labels the scrape job keeps, and confirm that the watcher's scrape jobs only retain labels that identify a Loki component, such as job, namespace and component name.

Relabeling that drops high-cardinality labels

Relabeling rules run before samples are stored and are the most direct control over series count. A labeldrop or labelkeep action removes labels that carry unique values, such as request paths or client addresses, before storage. Confirm that the relabel configuration runs on every scrape job, including any added later, and compare the active series count before and after each change.

Prometheus storage docs

Dashboards and alerts that query many series

A panel or alert rule that selects a metric without label filters, or groups by a high-cardinality label, reads far more series than it needs and slows the watcher under load. Review the Loki dashboards and rules that run against the watcher, add label matchers to each selector, and aggregate with sum by on component-level labels only.

Remote write volume from long-term storage

If the watcher forwards samples to external long-term storage through remote write, every series in the local instance is also sent, so cardinality becomes a transfer and storage cost. Decide which series are worth keeping for the long term, filter them with a write_relabel_configs rule before sending, and ask the storage provider for its series and sample limits before the first deployment.

Prometheus storage docs

New series after Loki upgrades

A Loki upgrade can add metric names, labels or histogram buckets, which creates new series even when the workload is unchanged. Compare the series count before and after each upgrade in a test environment, and update relabel rules and dashboards that depend on renamed or removed metrics. Confirm the metric changes in the release notes for the version you are moving to.

Meta-monitoring setup steps in order

This sequence builds a separate watcher stack for Loki, checks it can see every Loki component, controls series growth, locks down access, and proves it still reports when a Loki component fails. The result is a working stack you can debug a broken Loki cluster from.

  1. Confirm the watcher's location and failure domain

    Decide where the separate Prometheus, Alertmanager and Grafana stack will run and which failures it must survive. Grafana recommends a separate instance of Loki, Prometheus and Grafana so a broken Loki cluster can be troubleshot from a working one, so the watcher should not share the cluster's nodes, storage or network path where possible. Your platform team owns this decision, with your security team reviewing the network paths. Done when the team has a written location, a list of what fails together with the Loki cluster, and an agreed list of who receives alerts when the watcher itself is down.

  2. Deploy Prometheus, Alertmanager and Grafana with their own storage

    Install Prometheus, Alertmanager and Grafana in the watcher location, each with its own persistent storage. Prometheus stores data on local disk in a single-node time series database and is not clustered or replicated, so plan its disk as you would any single-node database. Grafana needs MySQL or PostgreSQL for production and high availability, since SQLite does not scale for production. Done when all three services start, Prometheus has a persistent volume, and Grafana connects to its external database without errors.

  3. Configure scrape targets for every Loki component

    Add a scrape job for the /metrics endpoint of each Loki component in your deployment mode, using service discovery where your platform supports it or static targets otherwise. Your Loki team supplies the component list, since the set differs between monolithic, simple scalable and microservices deployments. Done when the Prometheus targets page shows every expected Loki component as up, and any missing component is traced to a network rule, port or label error before you move on.

  4. Set relabeling to control cardinality

    Add relabeling rules that drop high-churn labels, such as pod hashes or request identifiers, and keep only the labels you use in dashboards and alerts. Prometheus stores each unique label combination as a separate series, so unbounded labels grow storage and query cost. Confirm with your Prometheus administrator how many series each Loki component produces before and after the change. Done when the total series count is recorded, it is stable across two scrape intervals, and no dashboard panel has lost a label it depends on.

  5. Require authentication on Grafana and metrics endpoints

    Put Grafana behind your organization's single sign-on or an authenticating proxy, and require authentication for the metrics endpoint as the Grafana security hardening guidance recommends. Also apply secure and SameSite cookies, a Content Security Policy, and domain verification against DNS rebinding. Your security team should confirm the exact settings against the current hardening guide for your Grafana version. Done when an unauthenticated request to Grafana and to the metrics endpoint is refused, and a test user can sign in through the chosen identity provider.

  6. Connect Prometheus to every Alertmanager and test an alert

    Point Prometheus at each Alertmanager instance directly rather than through a load balancer, which is how the Alertmanager documentation describes the setup for clustered instances. Create a test alert rule that fires on a known condition, such as a scrape target being down in a test window, and confirm it reaches your chosen receiver. Done when the alert appears in Alertmanager, is delivered to the receiver, and clears when the condition ends. Record the test in your runbook.

  7. Stop one non-critical Loki component in a test window

    During an agreed test window, stop one non-critical Loki component, such as a single querier replica in a deployment with redundancy, and confirm the watcher shows it as down within the alert path you built. Restart the component and confirm it returns to up and that the alert clears. The Loki team should approve the test and the component choice in advance so the test does not affect production users. Done when the watcher shows the outage, the alert fires and resolves, and the result is written into the runbook as the baseline for future checks.

Helm chart or hand-built scrape configuration

On Kubernetes, the Kubernetes Monitoring Helm chart is the packaged path for collecting metrics and logs from the cluster and its workloads, including Loki. Before installing, confirm the chart version you intend to use, read its values file for the scrape targets it enables, and check which Loki components it scrapes against the Loki version you run. Each Loki component exposes Prometheus metrics at /metrics, so the chart must reach every component you want to watch. Run the watching stack in a separate namespace or cluster so a failure in the monitored Loki does not take the watcher down with it.

  • Chart version: pin the chart version and record it in your change record, then confirm it against the Loki release you run.
  • Values file: keep the values under version control and review which scrape jobs, labels and remote write targets are enabled.
  • Component coverage: confirm that distributor, ingester, querier, query frontend, compactor and any gateway pods are all scraped.
  • Separate watcher: deploy Prometheus and Grafana for meta-monitoring apart from the cluster that runs Loki.
  • Cardinality review: check the default labels and drop unneeded series before the first run.

Check that every Loki component in your deployment mode appears as a healthy target before you trust any dashboard.

Protecting the watcher and the metrics it holds

The meta-monitoring stack can see inside your logging cluster, so it needs the same access discipline as the cluster itself. The cards below cover who can log in to Grafana, what the metrics endpoints expose, and how the Prometheus security model shapes who can query and scrape.

Choose Grafana sign-in method

Decide which login methods the monitoring Grafana will accept before it goes live. LDAP, generic OAuth and similar providers are available in every edition, while SAML, team sync and SCIM are limited to Grafana Enterprise and Grafana Cloud. Confirm that your identity provider fits one of the free options, or budget for the commercial edition if SAML or SCIM provisioning is a hard requirement. Test the login path from a machine outside the cluster network.

Grafana authentication docs

Require authentication on metrics endpoints

Every Loki component exposes Prometheus metrics at /metrics, and those endpoints are often reachable from anywhere the pods or hosts can be reached. Confirm which component endpoints are exposed on which network interfaces, and restrict them with network policy or a scrape-only identity. Check that the Prometheus scrape configuration uses credentials or a dedicated network path where your security policy requires it.

Harden the Grafana instance

Review the Grafana security hardening settings before exposing the monitoring instance to operators. Confirm that cookies are set as secure and SameSite, that a Content Security Policy and Trusted Types are enabled, and that the version is hidden from unauthenticated users. Also confirm that domain verification is active against DNS rebinding, and that the metrics endpoint requires authentication.

Security hardening docs

Scope who can query Prometheus

Prometheus has no built-in user authentication, so its security model depends on the network and the reverse proxy in front of it. Decide who may run PromQL queries against the meta-monitoring Prometheus, who may scrape targets, and who may reach the Alertmanager API. Confirm that the write and admin endpoints are not reachable by general operators, and document which team owns each boundary.

Prometheus security model

Treat metrics as sensitive data

Loki metrics can reveal tenant names, component names, replica counts and cluster topology, which helps an attacker map the logging system. Decide who may read these series and whether dashboards built on them are shared outside the platform team. Confirm that label values carrying tenant identifiers are reviewed before the stack is shared with external auditors or vendors.

How to know the watcher itself is healthy

The worst failure in a meta-monitoring setup is a watcher that stops without anyone noticing, because then the Loki cluster can break with no one looking at it from the working stack. Treat the separate Prometheus, Loki and Grafana instance as a production service with its own alerts. Start with a up alert on every scrape target that watches the watcher: the Prometheus server itself, its Alertmanager instances, and the Grafana instance that displays the data. Then add a per-component alert for each Loki component that scrapes into the separate stack, since each one exposes Prometheus metrics at /metrics. A target that goes down should page someone, and a silent gap in the data should also raise an alert, because a missing series is often the first sign of trouble. Route these alerts through Alertmanager and send a test notification through the same path your on-call team uses.

Watch the watcher's own resources as closely as Loki's. Prometheus stores data in a local time series database, and the Prometheus storage documentation states that local storage is not clustered or replicated and should be managed like any other single-node database. Alert on free disk space for the Prometheus data directory and on memory pressure, and size the retention setting so the volume can absorb a normal week of growth without filling. Confirm how your chosen retention is configured for the separate instance and whether a remote write target holds longer history. Also check that Alertmanager is reachable from every Prometheus instance, since the Alertmanager documentation says Prometheus should point at every Alertmanager instance rather than a load balancer.

Plan watcher upgrades as deliberately as Loki upgrades. Prometheus starts a new minor release cycle every 6 weeks, and after those 6 weeks a minor release generally no longer receives bug fixes, so an unpatched minor line will age out quickly. Prometheus long-term support releases receive bug fixes for one year. The current LTS line is 3.13, released July 1, 2026 and supported until July 31, 2027, and the latest releases on GitHub are v3.15.0, published September 25, 2026, and the LTS patch v3.13.4, published October 2, 2026. For Grafana, minor releases are supported for 9 months and patch releases come at least monthly. Confirm current versions on the Prometheus release cycle page and the grafana/grafana releases page before you choose a line, because these dates move as new releases ship.

Limits to confirm before you rely on the watcher

A separate Prometheus and Grafana stack is only useful if it reliably sees the Loki cluster it watches. The cards below cover the version, deployment mode, storage, network and log-collection points your team should confirm against vendor documentation and its own environment before relying on the watcher during an incident.

Confirm metric names for your Loki version

Metric names and the components that expose them can change between Loki releases, so dashboards and alerts written for one version may not match another. The latest GitHub release listed is v3.7.8, published September 17, 2026. Confirm which components your installed version exposes at /metrics, then check the metric names your alerts depend on against the Loki meta-monitoring documentation for that exact release.

Meta-monitoring docs

Plan for simple scalable mode removal

The Loki documentation states that simple scalable deployment mode is being deprecated and will be removed with the Loki 4.0 release. If your cluster runs in that mode, the read, write and backend targets that appear in scrape configuration may be renamed or replaced when you move. Ask your platform owner which deployment mode you run and whether a migration to another mode is on the roadmap before you lock in job labels and dashboards.

Deployment modes docs

Size Prometheus storage against retention

Prometheus stores data in a local time series database that is not clustered or replicated, and its default retention is 15 days. The watcher is most useful during incidents that happen when the main cluster is unhealthy, so its retention must cover the look-back window your team needs for root cause analysis. Confirm the disk size, the retention setting by time or size, and whether samples are also sent to external long-term storage through remote write.

Prometheus storage docs

Verify network paths to every component

The watcher only helps if it can reach each Loki component's metrics endpoint from outside the failing cluster's data path. Map every component, its port and the namespace or host it runs on, then test scraping from the watcher network. Your network or security team should confirm firewall rules, security group entries and any service mesh policies that could block scrapes during a partial outage.

Decide how Loki's own logs are collected

Scraping metrics does not collect the log lines that Loki components write to stdout or files. Decide whether those logs go to the watcher stack, to a separate logging path, or to the same cluster that is being monitored, and note that the last option fails with the cluster. Your platform team should confirm the log shipper used for Loki's own components and whether it is independent of the Loki cluster it monitors.

Confirm the Kubernetes chart version

The Kubernetes Monitoring Helm chart and the Loki chart are versioned separately, and each chart version pins specific component and scrape settings. Confirm which chart version your team has tested with your Loki release and which values files control the scrape targets, so a chart upgrade does not silently change what the watcher collects. Record the chart version in your change log alongside the Loki version.

What buyers ask before setting up Loki meta-monitoring

What drives the cost of meta-monitoring Loki?

The cost comes from four places: infrastructure for a separate Prometheus, Grafana and storage stack, storage for the metrics and any logs you keep, the implementation work, and the people who run the stack afterward. Prometheus is open source under Apache-2.0 and has no paid enterprise edition, so there is no license line to budget for the monitoring software itself. Infrastructure and storage recur every month and grow with the number of Loki components and the metrics retention you choose. Implementation is one-time, and operations is ongoing. For comparison, the Grafana pricing page lists a Pro tier with a 19 US dollar monthly platform fee plus usage, and an Enterprise tier with a minimum commitment of 25,000 US dollars per year, so a hosted option has published figures to weigh against self-hosting. Ask any partner for a quote built from a written scope that separates one-time and recurring costs.

How long does a Loki meta-monitoring setup take?

Duration depends on how many Loki components you run, whether you deploy in Kubernetes or on servers, how much of your existing Prometheus and Grafana you can reuse, and how many alert routes and dashboards you need. A cluster that already runs Prometheus and Grafana for other services usually needs less time than a greenfield build, because the work shifts to scraping Loki's metrics, separating storage, and wiring alerts. Each Loki component exposes Prometheus metrics at /metrics, so the scrape configuration is mostly a question of target discovery and labeling. Ask for a written timeline that names the environments, the number of Loki components in scope and the review checkpoints, and confirm which of those inputs your team has already decided.

What skills does our team need for Loki meta-monitoring?

You need people who can deploy and operate Kubernetes if Loki runs there, and people who can write Prometheus scrape configs, understand PromQL, and set retention and storage for a time series database. The Kubernetes Monitoring Helm chart reduces manual wiring, but someone still has to choose values, manage secrets, and review what gets collected. Grafana is needed to build dashboards and alert views. Your team should also understand cardinality, because every extra label value creates another series to store. Confirm these skills in your own staff before committing to a plan, and plan training or pairing for any gaps.

Can our team set up Loki meta-monitoring alone, and what does a partner add?

Yes, a team with the skills above can build it alone, using the Grafana documentation and the Kubernetes Monitoring Helm chart. The usual risk is not the first install but the later decisions: separate failure domains, retention for the monitoring stack, cardinality limits, and alerts that still fire when the main Loki cluster is down. A partner can plan those decisions in writing, implement the separate stack, test that it reports on a deliberately broken Loki component, document the runbooks, and hand off to your team or support it under a retainer. Whichever route you take, agree the handover criteria before work starts.

Does meta-monitoring Loki give us a compliance certificate?

No. Meta-monitoring is an operational control that helps you detect and debug failures in your logging pipeline. It does not produce a certificate, attestation or audit report. DeployOpen prepares systems, controls and evidence, such as configuration records, alert definitions and test results, for a compliance assessment. Independent auditors and certification bodies issue any reports. If you need evidence for a specific framework, confirm with your auditor which records they will request before the build starts.

Why run the monitoring stack separately from the Loki cluster?

A separate stack lets you investigate a broken Loki cluster from a working one. If Loki's own storage or query path fails, the logs that would explain the failure may be unreachable, so Grafana recommends collecting data about Loki in a separate Loki, Prometheus and Grafana instance. Prometheus stores data in a local time series database that is not clustered or replicated, so it should be run and backed up like any single-node database. Plan its retention and storage explicitly rather than assuming the main cluster's settings apply.

What should we watch for in metrics cardinality?

Cardinality is the number of distinct series, which grows with every unique combination of label values. Loki metrics often include labels such as tenant, component or pod, and a careless scrape that adds request IDs or unbounded values will multiply series quickly. Keep labels to bounded values, drop unneeded series at scrape time, and track series counts per job before and after changes. Prometheus favors reliability over precision, so plan for alerts that tolerate small scrape gaps, and confirm the series budget with the team that will pay for storage.

How DeployOpen scopes and delivers Loki meta-monitoring

DeployOpen plans and builds the monitoring stack that watches your Loki cluster, kept separate from the cluster it observes so that a Loki failure can be investigated from working tooling. Engagements are fixed-scope, with the monitoring path, cardinality limits, dashboards, alerts and handover agreed in writing before work starts.

How we scope

  • We map every Loki component, deployment mode and tenant that must expose metrics to the monitoring stack.
  • We agree in writing where the separate Loki, Prometheus and Grafana instances will run, and what they must not depend on.
  • We define which metrics, retention periods and alert destinations are in scope, and which are excluded, before work starts.

How we build

  • We configure Prometheus scraping of each Loki component's /metrics endpoint and check that every target reports.
  • We review label sets and series counts early, so metrics cardinality stays within limits you can afford to run.
  • We provision Grafana dashboards and alert rules as code, so they can be reviewed, versioned and redeployed consistently.

How we hand over

  • We document the architecture, scrape configuration, retention settings and the failure modes the monitoring stack covers.
  • We walk your platform and on-call teams through the dashboards and alerts, and test that alerts fire to the right people.
  • We deliver a runbook that states what each alert means, what to check first and who owns the response.

How we support

  • Ongoing support, upgrades and continuous testing are available as a retainer after handover.
  • We can review the monitoring stack when Loki is upgraded, since new releases may change exposed metrics.
  • We confirm with you, in the written scope, how monitoring stack patches and Prometheus or Grafana version upgrades are handled.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.