PCA flashcards
PCA · Build recall with a focused review session.
33 cards. Read the term and the definition here. The deck at the top of this page is optional.
- Four golden signals
- Latency, traffic, errors, and saturation. Latency should separate successful from failed requests; saturation measures how full a constrained resource is.
- SLI, SLO, and error budget
- An SLI is a measured ratio of good to valid events. An SLO is the target percentage over a window. The error budget is 1 minus the SLO.
- Cardinality
- The number of distinct label-value combinations a metric produces. Unbounded labels such as user IDs or request paths multiply series count and exhaust Prometheus memory.
- RED method
- Rate, Errors, Duration. A per-service monitoring pattern for request-driven workloads, complementing the USE method, which targets resources rather than services.
- USE method
- Utilization, Saturation, Errors, evaluated per resource such as CPU, memory, disk, or network. It reveals capacity limits that service-level metrics can hide.
- Exemplars
- Sample annotations that attach a trace ID to a metric observation, letting you jump from an aggregated metric spike to a specific distributed trace.
- Pull versus push collection
- Prometheus scrapes targets over HTTP rather than receiving pushes. A failed scrape yields up=0, so target liveness is directly observable in the metrics.
- Scrape and evaluation intervals
- scrape_interval sets how often targets are polled (default 60s). evaluation_interval sets how often recording and alerting rules run; both can be overridden per job.
- relabel_configs versus metric_relabel_configs
- relabel_configs run before scraping and can drop or rewrite targets. metric_relabel_configs run after scraping and can drop or rename individual samples.
- Recording rules
- Rules that precompute an expensive PromQL expression into a new series, conventionally named level:metric:operation. They reduce query cost and dashboard load.
- Service discovery meta labels
- Labels prefixed __meta_ produced by discovery mechanisms such as kubernetes_sd_configs. They exist only during relabeling and are removed before the sample is stored.
- Local TSDB retention
- Prometheus stores samples in two-hour blocks on local disk. Retention is controlled by the --storage.tsdb.retention.time flag, defaulting to 15 days.
- Staleness markers
- When a target stops being scraped, Prometheus writes a staleness marker so queries stop returning the last value as if it were current.
- rate() versus irate()
- rate() averages the per-second increase across the whole range and suits alerting. irate() uses only the last two samples, reacting faster but noisier.
- Range vector restrictions
- A selector like metric[5m] yields a range vector, which cannot be graphed directly. It must be passed to a function such as rate or avg_over_time.
- histogram_quantile()
- Computes a percentile from cumulative bucket series. You must preserve the le label, typically via sum by (le) (rate(metric_bucket[5m])).
- Aggregation by and without
- by() keeps only the listed labels; without() drops them and keeps the rest. Aggregating away high-cardinality labels before alerting reduces alert noise.
- Label matcher operators
- Selectors support =, !=, =~, and !~. At least one matcher must not match the empty string, so a selector of only negative matchers is invalid.
- group_left and group_right
- Modifiers for many-to-one or one-to-many vector matching. They accompany on() or ignoring() to join vectors whose label sets differ in cardinality.
- offset modifier
- Shifts a query's evaluation back in time, as in metric[5m] offset 1d. Useful for comparing current behavior against the same period yesterday.
- Counter versus gauge
- A counter only increases and is queried with rate() or increase(). A gauge can rise and fall and is queried with delta() or arithmetic directly.
- Histogram versus summary
- Histograms expose cumulative buckets that aggregate across instances and support histogram_quantile. Summaries compute quantiles client-side and cannot be merged across instances.
- Counter naming convention
- Counters end in _total, histograms expose _bucket, _sum, and _count, and base units such as seconds and bytes are used as suffixes rather than converted.
- node_exporter
- An exporter exposing host-level metrics such as CPU, memory, filesystem, and network. It runs alongside the node and is scraped by Prometheus like any other target.
- blackbox_exporter
- An exporter that performs active probes over HTTP, TCP, ICMP, or DNS and reports success and latency, useful for monitoring endpoints from outside the service.
- Pushgateway use case
- Intended for short-lived batch jobs that cannot be scraped. It retains the last pushed value indefinitely, so it is unsuitable for long-running services.
- Label value hygiene
- Label values must come from a bounded set. User IDs, emails, raw URLs, and error messages belong in logs or traces, not in metric labels.
- Alert for clause
- The duration an alert expression must remain true before the alert transitions from pending to firing. Omitting it makes the alert fire on first evaluation.
- Alertmanager grouping
- Alerts sharing the group_by labels are batched into a single notification. group_wait delays the first send and group_interval spaces subsequent batches.
- Alertmanager inhibition
- A rule that suppresses lower-severity alerts when a matching higher-severity alert is already firing, reducing duplicate pages during a widespread outage.
- Alertmanager silences
- Time-bounded mutes defined by label matchers, a start and end time, and a creator. They suppress notifications without changing alert rule evaluation.
- Multi-window burn rate
- An SLO alerting pattern combining a fast short window with a slower long window, so both rapid budget burn and gradual drift trigger while false pages stay low.
- Dashboard panel design
- Each panel answers one question, graphs rate() rather than raw counters, sets explicit units, and uses a consistent time range across the dashboard.