Monitoring and Logging Flashcards
7 cards from real KCNA practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 Monitoring and Logging flashcards as text
What does the PromQL function `rate()` calculate?
Answer: The per-second average rate of increase of a counter over a time range
rate() calculates the per-second average increase rate of a counter over the specified time range, accounting for counter resets.
In Kubernetes, which field in a pod spec controls the maximum number of log lines retained per container when using the json-file log driver?
Answer: Container runtime log configuration on the node
Log rotation limits (max file size, max files) are configured at the container runtime level on each node, not within the pod spec itself.
What is Loki's primary design difference from Elasticsearch for log storage?
Answer: Loki only indexes log labels/metadata, not log content
Loki indexes only the labels (metadata) attached to log streams, not the log content itself, making it more cost-efficient for storage and ingestion.
Which CNCF project is the de facto standard for distributed tracing, providing SDKs, a collector, and a UI?
Answer: Jaeger
Jaeger is a CNCF graduated project purpose-built for distributed tracing, offering client libraries, a collector, a query service, and a web UI.
What is the function of a Prometheus 'recording rule'?
Answer: Pre-compute expensive PromQL queries and store results as new time series
Recording rules allow you to pre-compute frequently used or expensive PromQL expressions and save their results as new time series for faster querying.
In the context of cloud-native observability, what are the 'Three Pillars of Observability'?
Answer: Logs, Metrics, and Traces
The three pillars of observability are Logs (event records), Metrics (numeric measurements over time), and Traces (request flows across services).
Which Kubernetes API allows external monitoring tools to retrieve resource usage metrics (CPU, memory) from pods and nodes?
Answer: Resource Metrics API
The Resource Metrics API (metrics.k8s.io) exposes CPU and memory usage for pods and nodes, typically served by metrics-server.