Most Grafana you see in tutorials shows demo data. The Grafana behind this site is now open to everyone, read-only: the live metrics and logs of mk4, the small k3s cluster on Hetzner that runs jithendar.com and its side projects. Start here: Live infrastructure (opens in a new tab). Cloudflare asks you to confirm you're human once, and there's no sign-in.
This post covers how it's built, what it exposes, what went wrong on the way, and how to use it to learn Grafana.
The short version:
- Anonymous visitors are Viewers in their own Grafana org, called Public. They see 16 dashboards: a landing page, 9 about the platform (Kubernetes, Istio, PostgreSQL, Valkey, GitHub Actions runners, embeddings, the monitoring stack) and 6 about MOKS, the SRE agent. The site's own 7 dashboards stay in the main org, behind the sign-in.
- A Viewer can query every data source in their org, not only the queries on the dashboards. So the org, not the dashboard list, decides what's public: Prometheus and Loki, but not Jaeger.
- Cloudflare asks every visitor to prove they're human (a WAF custom rule with a Managed Challenge). The Istio gateway refuses
/grafanato anyone who doesn't come through Cloudflare, so the check can't be skipped by connecting to the server directly. - Every dashboard lives in one Git repository, mrjithendar/monitoring (opens in a new tab). A workflow turns each one into a ConfigMap, and Grafana's sidecar loads it into the right org and folder within a minute, without a restart.
- Before going public, I ran all 637 dashboard queries against the live data. That found a whole application that isn't running, four panels on metrics the site no longer exports, and a log query Loki refused.

Use it to learn Grafana
Reading other people's dashboards is one of the fastest ways to learn PromQL and LogQL. Here the data is real, the queries are written for production, and nothing you click can break anything. An anonymous visitor can:
- Open every public dashboard, change its time range and refresh rate, and pick values in its variables (the dropdowns at the top).
- Inspect any panel. In the panel menu, Inspect → Query shows the exact request Grafana sent and the response, and Inspect → Data shows the numbers behind the chart (with a CSV download). Inspect → Panel JSON shows the whole panel definition.
- Read the dashboard's source. Each dashboard is one JSON file in mrjithendar/monitoring (opens in a new tab), named after the uid at the end of its URL.
/grafana/d/platform-redisisdashboards/public/Platform/platform-redis.json.
A visitor can't use Explore, edit or save a dashboard, create alerts, or see the main org. I checked their permission list in Grafana itself. It has datasources:query and datasources:read, and nothing that writes.
Five panels worth opening, each with one idea:
1. A rate of a counter, divided by capacity. Platform · Kubernetes cluster → CPU used:
sum(rate(container_cpu_usage_seconds_total{job="kubernetes-cadvisor", container!="",container!="POD"}[5m]))
/ sum(machine_cpu_cores{job="kubernetes-cadvisor"})container_cpu_usage_seconds_total only ever grows, so rate() turns it into cores in use. container!="" drops cAdvisor's per-pod and per-node totals, which would otherwise count the same CPU twice. Every query names its scrape job, so series that another cluster writes into this Prometheus can never mix in.
2. A percentile from a histogram. Platform · Istio mesh → p95 latency:
histogram_quantile(0.95, sum by (le) (rate(istio_request_duration_milliseconds_bucket{job="envoy-stats", reporter="destination", destination_workload_namespace=~"$namespace", destination_workload=~"$workload"}[5m])))The sum by (le) keeps the bucket boundaries and adds up everything else. Drop le and histogram_quantile has nothing to work with. Change the Namespace dropdown and watch $namespace change in Inspect → Query.
3. How much happened in the time range on screen. Platform · GitHub runners → Jobs finished:
round(sum(increase(gha_completed_jobs_total{job="arc", repository=~"$repository"}[$__range]))) or vector(0)$__range is the dashboard's time range, so the number follows the time picker. or vector(0) shows 0 instead of "No data" when no job finished, because Prometheus only stores a labelled counter after it first goes up.
4. The first-sample problem. Platform · Embeddings (bge-m3) → Requests. increase() only counts the change between samples it can see. A series that first appears inside the window starts at some value, and that value is lost, so a new caller's first requests would vanish. The query adds the first value of each new series to increase():
increase(x[$__range])
+ (min_over_time(x[$__range]) unless x offset $__range)Here x stands for the Istio request counter with its selectors. Open the panel's Inspect → Query to see the full version, which also counts requests that never reached the pod.
5. Logs next to metrics. MOKS · Overview → Warnings and errors is a Loki panel:
{namespace="$namespace", container=~"api|worker|crewai|executor|terminal|reranker|embedder", level=~"warn|error"}$namespace is a constant variable (moks-sre), and the data source itself is a variable ($logs). That lets one JSON file work against any Loki. The rest of the dashboard is Prometheus.
There's one more to look at: Platform · Observability stack. It's the monitoring monitoring itself: Prometheus series and samples per second, Loki lines received, and Alloy's dropped entries.
How it's built
Why not Grafana's shared dashboards
Grafana has a feature made for this: "Share externally" (previously "public dashboards") gives one dashboard a public link and runs only the queries saved in it. That's safer than anonymous access, because visitors can't write their own queries. But its documented limits include "Variables and queries including variables are not supported", and 15 of our 24 dashboards use variables: every MOKS dashboard and most Platform ones. Rewriting them all without variables would have made them worse to read, so we used anonymous access instead and treated the data sources as the boundary.
An org of its own, read-only
Anonymous access in Grafana is three settings, which Terraform adds only when grafana_public is set (minikube-infrastructure/grafana.tf in k8s-deployments (opens in a new tab)):
# grafana.ini, as the Helm values render it
auth.anonymous:
enabled: true
org_name: Public # visitors land in this org…
org_role: Viewer # …and can only read
hide_version: trueThe org has to exist first. Grafana's file provisioning expects the orgId you give it to exist already, so I created it once with one API call (POST /grafana/api/orgs) and put the id it returned in the Terraform variables. The same Terraform gives that org its own copies of the data sources, with the same uids, so dashboards work in either org unchanged.
What a Viewer can query
This is the part most "make Grafana public" guides skip. Grafana's /api/ds/query endpoint runs any query against any data source the user's org has. A Viewer doesn't need Explore for that: one request without credentials ran count(up) against Prometheus and got an answer. The anonymous permission list has 28 actions, all of them read, list or query. Hiding a dashboard hides a page, not the data behind it.
So each data source is a yes-or-no decision:
| Data source | Org Public | Why |
|---|---|---|
| Prometheus | yes | Infrastructure metrics. I checked all 347 label names on 24 November: no visitor addresses, emails or user ids. Addresses inside the cluster and node names are there. |
| Loki | yes | The application logs, for the MOKS log panels. Look at what your own logs contain before you copy this: request logs usually carry client addresses. |
| Jaeger | no | Only the site's private dashboards read traces. The public copy of Loki also drops its "View trace" links into Jaeger. |
The human check, at Cloudflare
jithendar.com is already proxied by Cloudflare (the orange cloud). One WAF custom rule (Security rules → Create rule → Custom rules) puts a Managed Challenge in front of Grafana. The expression from our runbook:
(http.host in {"jithendar.com" "www.jithendar.com"} and starts_with(http.request.uri.path, "/grafana"))
→ Managed ChallengeA browser solves it once and gets a cf_clearance cookie. A script gets 403 with the header cf-mitigated: challenge. How long a pass lasts is the zone-wide Challenge Passage setting. When it runs out on an open dashboard, the background refreshes fail until the page is reloaded, because a challenge can't be solved inside an XHR request.
Be clear about what this buys: it stops bots and casual scraping, not a person. Someone who passes once can script requests with their cookie until it expires. That's why the data source table above matters more than the challenge.
Caching needed no work. Grafana sends Cache-Control: no-store on its pages and API responses, and Cloudflare passed them through as BYPASS, so a signed-in page can never be served to someone else.
Closing the side door at the gateway
A Cloudflare rule only applies to traffic that passes through Cloudflare. Anyone who knows the server's address can send Host: jithendar.com straight to it. So the Istio ingress gateway refuses /grafana unless the connection comes from one of Cloudflare's published address ranges. Here it is from deploy/minikube/istio/edge/templates/cloudflare-public.yaml, rendered and shortened:
apiVersion: security.istio.io/v1
kind: AuthorizationPolicy
metadata:
name: cloudflare-public
spec:
action: DENY
rules:
- from:
- source:
notRemoteIpBlocks: [173.245.48.0/20, 103.21.244.0/22, …] # Cloudflare's ranges
to:
- operation:
paths: ["/grafana", "/grafana/*"]The detail that matters is notRemoteIpBlocks, not notIpBlocks. In Istio, ipBlocks is the direct peer, which here is always Hetzner's load balancer. remoteIpBlocks is the client address the load balancer passes on with the PROXY protocol. Four days earlier, a rule written with ipBlocks had refused every request Cloudflare sent, and every page of this site answered "RBAC: access denied" for a few minutes. The test for this chart now checks the field.
Checked from outside: straight to the server, /grafana/api/health answers 403 while / still answers 200.
Dashboards as code: one repository, one workflow
Until 24 November the dashboards were spread over three repositories, and one set was copied by hand between two of them. They now all live in mrjithendar/monitoring (opens in a new tab), and a dashboard's directory decides where it appears:
| Path | Grafana |
|---|---|
dashboards/public/live-infrastructure.json | org Public, the landing page |
dashboards/public/Platform/ (9), dashboards/public/MOKS/ (6) | org Public, one folder each |
dashboards/private/Jithendar.com/ (7) | main org, signed in only |
dashboards/inactive/RoboShop/ | not deployed |
The pieces:
- Each dashboard becomes one ConfigMap in its own namespace, with the label
grafana_dashboard=1and the annotationgrafana_folder: public/Platform(orprivate/Jithendar.com).deploy.ymlapplies them server-side, which avoids storing every dashboard twice in alast-appliedannotation. It then deletes the ConfigMaps whose file was removed from Git. - Grafana's dashboard sidecar (k8s-sidecar (opens in a new tab), part of the Grafana Helm chart) watches that namespace and writes each dashboard to
/tmp/dashboards/<annotation>/<uid>.json. - Two file providers read those directories:
publicinto the org Public andprivateinto the main org, withfoldersFromFilesStructure, so each subdirectory becomes a Grafana folder. - The deploy's identity can do almost nothing. The workflow's ServiceAccount may only manage ConfigMaps in that namespace. Its token Secret is created by a one-time setup script, not by Terraform, so the token never lands in the Terraform state.
- Grafana itself gets less than the chart would give it. With a sidecar on, the chart's default ClusterRole would let Grafana read every Secret and ConfigMap in the cluster, which is a poor fit for a Grafana that anyone can reach. The chart's RBAC is switched off, and a Role allows
get,listandwatchon ConfigMaps in that one namespace.
The repository's checks run on every pull request:
- uid equals file name;
- no overlapping panels;
- each dashboard uses only the data sources its org has, so no Jaeger in public;
- every variable it uses is defined;
- no link points at a dashboard in the other org.
The workflow also checks out k8s-deployments next to it, to confirm that Prometheus's scrape filters keep every Istio and GitHub runner series the dashboards read.
Reviewing 24 dashboards against live data
Static checks can't tell whether a panel shows anything. So the repository has scripts/audit_live.py: over port-forwards to Prometheus and Loki, it runs every query of every dashboard over the last six hours. It reports the queries that error, the ones reading a metric Prometheus has never stored, and the ones that return nothing.
The first run said 378 of 637 queries read missing metrics. Almost all were label names inside by (...) that my parser had taken for metric names, which is a reminder to check the checker. After that fix: 469 OK, 87 empty, 80 reading a metric that doesn't exist, and 1 error. Most of the "missing" ones are counters that have never fired: no failed injections, no rejected jobs. The real problems were:
- RoboShop isn't running on mk4. Its namespace has no workloads, so its services and logs dashboards could show nothing. They're kept in
inactive/and not deployed. - Two "RoboShop" dashboards weren't about RoboShop. They were cluster-wide: CPU, memory and pods for every namespace, and the health of Prometheus, Loki and Alloy. They became Platform · Kubernetes cluster and Platform · Observability stack, with every query pinned to its scrape job and the old "Minikube" wording gone.
- Four panels read
cache_bus_*metrics the site no longer exports. Its cache bus reports problems in its logs now. The panels are removed. - One log query hit Loki's limit of 500 series per query. It counted requests by route, and URL scanners' 404s alone produce more distinct routes than that. It now counts answered requests only (
status < 400 | keep route).
Every public dashboard also got the same header: read-only, one crosshair across all panels, a folder tag, and links to the landing page, its folder and this site.
What went wrong on the way
- The org name has to match exactly. Grafana finds the anonymous org by name. Ours was created with a slightly different name, so every visit was sent to the login page. The log said
failed to get org by name: Public, and renaming the org fixed it at once. - "No dashboards" on the home page. Grafana's default home lists only starred and recently viewed dashboards, and an anonymous visitor has neither. The fix was a landing page set as the default home (
default_home_dashboard_path). - Two provisioning files with one name. The Grafana chart stores data sources and dashboard providers in one ConfigMap, keyed by file name. Both of my new files were called
public.yaml, so one silently replaced the other. Rendering the real chart before merging caught it. - The admin password in the Secret wasn't Grafana's. The chart's admin Secret is used only when Grafana first creates its database, and the live password had since changed. The sidecar's "reload dashboards" call needs that password, so it's off. The providers poll every 30 seconds instead.
Linking to it, and copying it
The dashboard URLs are meant to stay put. Each uid is a file name in the repository, and changing it would break links in posts like this one. Link the landing page, jithendar.com/grafana/d/live-infrastructure (opens in a new tab), or any dashboard's /grafana/d/<uid>.
To build the same thing, the parts are all public:
- the Terraform and Helm values in k8s-deployments (opens in a new tab):
minikube-infrastructure/grafana.tf,deploy/minikube/observability/grafana/values.yaml, and the runbookdocs/grafana-public.md; - the dashboards, checks and deploy workflow in monitoring (opens in a new tab).
Two things to decide before you start:
- which data sources you're willing to make fully public;
- whether a human check is enough, or the dashboards need a real login.



Discussion comments
No comments yet. Start the discussion.