Skip to main content

When a dashboard cannot see, it must say so

Updated 5 min readMarkdown

An empty list on a dashboard means one of two things. Either there is nothing there, or the dashboard could not find out. The first is good news. The second is no news, dressed as good news. Telling them apart is most of what makes a dashboard worth trusting.

EnvMap reads a lot of other systems: Kubernetes clusters, Argo CD, Prometheus, Alertmanager, Grafana, CI servers, scanners, certificate stores, hypervisors, server hardware. Any of them can be slow, down, or refuse the credential it was given. Every page has to decide what to show when that happens.

The easy answer is to show what came back. When nothing came back, that is an empty list, and an empty list looks clean. This post is about the four times EnvMap shipped that easy answer, and the rule that replaced it.

1. A cluster that could not be read looked like a cluster with nothing expiring

The Expiry radar collects every TLS certificate in every cluster and sorts them by when they run out. To find them it asks each cluster for its secrets of type TLS.

A read-only kubeconfig without permission to list secrets cluster-wide is an ordinary thing to be handed. kubectl answered Error from server (Forbidden), the function that ran it returned an empty string for any failure, and the parser read an empty string as "no certificates". That cluster then showed on the radar as having nothing to worry about.

The fix was to make the read return the error with the text, and to carry kubectl's own sentence to the page. "Forbidden" is the diagnosis. Hiding it hid the reason and the problem together.

2. An alert panel that said "nothing firing" about systems it could not reach

The Overview can show a panel of firing alerts from every connected monitoring system. The first version asked each one in parallel and skipped any that returned nothing.

An unreachable Prometheus returned nothing. So a panel over three systems, none of which answered, said nothing firing, which is exactly what a person glancing at a wall screen wants to read, and exactly what was not known.

Now every system that did not answer is named on the panel as not answering, and when none answered the panel draws no counts at all. A zero is a measurement. It may only appear when something was measured.

3. Silenced alerts counted as firing, and firing alerts counted as silenced

The same panel had a second problem: each platform words alert state differently. Prometheus says firing. Alertmanager and Grafana say active. Silenced alerts are suppressed, silenced or inhibited depending on who you ask.

One page treated anything that was not active as muted, so every firing Prometheus alert was counted as suppressed. Another counted Grafana's silenced alerts in the firing tiles. Both pages showed plausible numbers, and both were wrong.

The fix was one vocabulary, set in one place, that every platform's answer passes through before anything counts it. A page counts that one list, never the raw words.

4. A page that was as slow as the slowest thing it read

This one looks like a performance bug, and it is the same bug.

On an estate of 24 clusters and 10 connections, with nothing cached yet, the GitOps page took 19.6 seconds to open. Server hardware took 16.1. The Overview took 10.4. Every one of those pages rendered in under 15 milliseconds once its data was in memory. The time was spent waiting for the one cluster that was not answering.

The obvious fix is a timeout. But a page that gives up after a timeout and shows what arrived has a new problem: a table of 8 clusters on an estate of 24, with nothing to explain the gap. That page lies faster than the old one.

So the fix has two halves:

  • Draw what has arrived within a fixed deadline, a fraction of a second, and keep reading in the background.
  • Say what is missing. The page names the systems it is still reading, and fills them in when they answer.

Measured afterwards: the GitOps page in 0.45 seconds, hardware in 0.42, the Overview in 0.45, each saying out loud which clusters were still on their way.

The rule

Out of those four came one rule, now written into how every page is built:

A system that did not answer shows a dash or an error, never a zero. A list that could not be read is an error, never an empty list. A page still waiting on a slow system says which one.

It sounds obvious. It was broken four times by code that was correct about everything it looked at. In each case the failure was invisible, because the wrong answer was the reassuring one.

Why this matters more for an operations tool

A wrong number on a sales dashboard misleads a meeting. A wrong "nothing expiring" or "nothing firing" on an operations dashboard is the reason nobody looks, until the certificate expires or the alert becomes an outage.

So the question to ask of any dashboard, including EnvMap, is not "is it green" but "would it tell me if it could not see". Unplug one of its sources and look at the page.

Try it

EnvMap is open source under Apache-2.0. The demo shows the real screens with pretend data, and it runs on one machine with Docker Compose:

curl -fsSLO \
  https://raw.githubusercontent.com/ammar-hassoun/envmap/main/deploy/compose/compose.yaml
docker compose up -d

More on how it behaves: the security model, and another post from the EnvMap blog, how a privileged session recording is built.


First published on envmap.tech. Written with help from an AI assistant; every detail was checked against EnvMap's code.

About the author

  • I maintain EnvMap, an open-source, self-hosted DevOps control plane: Kubernetes, GitOps, certificates and a privileged access manager that records SSH, RDP and VNC sessions. I write about what broke while building it.

"No news, dressed as good news" is a great way to put it. The expiry radar case, where a Forbidden became an empty string and then "no certificates", is exactly how a careful tool ends up reassuring someone about the one cluster it could not see.

Ascendra Ventures wrote about a close cousin of this while building memory for its own AI coding tools. One parser read every field a single column off and reported numbers that were confidently, uniformly wrong, and nothing in the output looked broken. The post's conclusion was that the real problem is the boundary: which figure the model may propose, and which figure plain code must be allowed to throw out. Its short version was to put the model in the middle, never on the edges.

Your rule that a page must say when it could not read a source feels like the dashboard form of the same principle. Do you also show the time of the last successful read next to each source, so a stale but technically valid answer is visible too?

Thank you, and "the model in the middle, never on the edges" is a good way to put the boundary.

Honest answer: partly. Where a page shows a cached copy while it fetches a fresh one, it says how old it is (the cloud accounts page reads "12 min old, refreshing"), and a slow source is named on the page as still being read. But the connections list shows the result of each system's last check, not when it last answered successfully.

So a "last good read" time beside every source is the missing piece you describe: an answer that is valid but old should look old. That's a good addition, and I've noted it.