Prometheus 00:00:01 When the second ticket counter goes quiet At the opening of a concert sale, Leila sees orders at two checkout counters. A quiet graph could mean an empty queue or a broken sensor. Prometheus observes instrumented services by discovering targets and periodically asking each one for its measurements. The first target answers. Prometheus associates the observation with its job, its instance and the time of the scrape. The up series is one for that successful scrape. A sample belongs to a particular series because of its metric name and complete label set. The other target misses the configured ten-second deadline. Its up sample is zero. Leila can distinguish an inaccessible counter from one reporting zero orders. Discovery also matters. A removed target eventually becomes stale, which is different again from a target that remains listed and fails. 00:00:50 Read the speed from a rising counter The checkout counter reports a hundred requests. Has the sale become busy? A total alone offers no time interval. Leila keeps successive samples for the same instance, whose counter normally increases between process restarts. Fifteen seconds later it reads a hundred thirty. Thirty more requests over fifteen seconds gives two requests per second for that observed interval. A dashboard should say requests per second so nobody mistakes a rate for a cumulative total. Watch the next worker restart. The raw value falls to eight. Treating that fall as negative sales would be absurd. The rate function accounts for counter resets and extrapolates across its range. Calculate a rate for each series before aggregating workers so an individual reset stays visible. 00:01:36 Count the series before adding a label Leila wants to split requests by method. With five observed methods and all other labels fixed, this example has five series. The next dimension multiplies the possibilities. It does not merely add a column to a table. Eight statuses across five methods allow forty combinations. Add fifty normalized routes and the ceiling becomes two thousand for one instance. Real data may occupy fewer combinations. A route template lets many actual ticket identifiers share a useful bucket. Twenty instances take the illustrative ceiling to forty thousand. Giving every customer a separate label would multiply it again. Put customer-level investigation in an appropriately governed event or trace. Keep metric dimensions bounded enough to query during the actual sale. 00:02:24 Turn a spike into one useful page An error share reaches eight percent. The alert enters pending because Leila configured a ten-minute persistence requirement. A single scrape has not established ten minutes of failure. The evaluation interval determines when the rule checks again. If the condition remains true across that period, the alert can begin firing. Prometheus evaluates the rule. Alertmanager handles routing, grouping and notification policy. Those are separate decisions that operators can test independently. Forty instances can report the same underlying failure. Group related alerts into one notification with enough labels to locate the affected checkout service. If the expression clears, resolution notification depends on the receiver configuration. One message should still lead to the underlying evidence. 00:03:14 Recover the monitor and test the blind spot A scrape reaches the in-memory head and the write-ahead log on disk. Recent data has a different recovery path from older compacted blocks. The distinction matters the moment the monitoring process crashes. On restart, Prometheus rebuilds the head from recoverable log data. Persist the data directory if the observations must survive a replacement. Compaction also needs temporary headroom, even when retention seems to fit comfortably on paper. A brief maintenance job can disappear between scrapes. A suitable service-level batch job can push its last result to a gateway, which keeps exposing it until managed or deleted. Check the age of the last successful run. At Leila's ticket counters, timestamps, target health and rates now answer three different questions.