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
When using Grafana with Loki as a data source, which query language is used to filter and search logs?
Answer: LogQL
LogQL is Loki's query language, inspired by PromQL, used to filter log streams by labels and search log content using line filters.
What is the primary purpose of cAdvisor in a Kubernetes node?
Answer: Collect resource usage and performance metrics for running containers
cAdvisor (Container Advisor) is embedded in the kubelet and collects CPU, memory, filesystem, and network usage metrics for containers running on the node.
What does 'cardinality' mean in the context of Prometheus metrics, and why does high cardinality matter?
Answer: The total number of unique label value combinations for a metric
Cardinality is the number of unique time series created by all combinations of label values; high cardinality can exhaust Prometheus memory and degrade performance.
In Kubernetes, what happens to a pod's logs after the pod is deleted?
Answer: Logs are permanently lost unless a log aggregation system collected them
When a pod is deleted, its log files on the node are garbage collected, so logs must be shipped to an external system before deletion to be retained.
Which OpenTelemetry component acts as a central agent that receives, processes, and exports telemetry data from multiple sources?
Answer: OTel Collector
The OpenTelemetry Collector is a vendor-agnostic proxy that receives telemetry from applications, processes it (filter, transform, batch), and exports it to backends.
What is a Prometheus 'exporter' and when would you use one?
Answer: An adapter that exposes metrics from third-party systems in Prometheus format
A Prometheus exporter is a bridge that converts metrics from systems that don't natively expose Prometheus format (e.g., MySQL, Redis, HAProxy) into the /metrics endpoint format.
Which Kubernetes feature allows you to define structured log output format (JSON) at the kubelet level to improve log parsability?
Answer: Log format flag --logging-format=json on kubelet
The kubelet supports the --logging-format=json flag (or equivalent config) to emit structured JSON logs, making them easier to parse and index by log aggregators.