Skip to main content

Quiz Module 11 - Monitoring and Observability

Instructions

This quiz contains 30 multiple-choice questions.


Question 1

Which tool is commonly used to collect metrics in Kubernetes?

Show explanation

Correct answer: Prometheus

Explanation: Prometheus is an open-source monitoring system that efficiently collects and stores metrics.


Question 2

What is Prometheus?

Show explanation

Correct answer: An open-source monitoring system that efficiently collects and stores metrics

Explanation: Prometheus is a monitoring system that collects metrics via pull, stores them in a time-series database, and allows queries via PromQL.


Question 3

What is Grafana?

Show explanation

Correct answer: A visualization and metrics analysis platform that connects to Prometheus

Explanation: Grafana is a visualization tool that allows creating interactive dashboards from metrics collected by Prometheus.


Question 4

What is a ServiceMonitor in Prometheus Operator?

Show explanation

Correct answer: A CRD resource that tells Prometheus which Services to scrape for metrics

Explanation: ServiceMonitor is a Custom Resource Definition that allows automatically configuring Prometheus to scrape metrics from Kubernetes Services.


Question 5

What is the command to view the logs of a Pod?

Show explanation

Correct answer: kubectl logs [pod-name]

Explanation: kubectl logs displays the logs of a Pod. Use -f to follow logs in real time and --previous to view logs from a restarted Pod.


Question 6

What is Loki?

Show explanation

Correct answer: A log aggregation system designed to work with Grafana

Explanation: Loki is a logging system that indexes log metadata rather than content, enabling efficient aggregation and native integration with Grafana.


Question 7

What is Alertmanager?

Show explanation

Correct answer: A component that manages alerts generated by Prometheus

Explanation: Alertmanager receives alerts from Prometheus, groups them, deduplicates them, and routes them to the appropriate channels (email, Slack, PagerDuty, etc.).


Question 8

What is a metric in Prometheus?

Show explanation

Correct answer: A numerical measurement with a name, labels, and a temporal value

Explanation: Prometheus metrics are time series with a name (e.g., http_requests_total), labels (e.g., method="GET"), and numerical values.


Question 9

What is PromQL?

Show explanation

Correct answer: The Prometheus query language for querying metrics

Explanation: PromQL (Prometheus Query Language) allows selecting and aggregating metrics, used in Grafana and alerts.


Question 10

What is an Exporter in Prometheus?

Show explanation

Correct answer: An application that exposes metrics in Prometheus format to be scraped

Explanation: Exporters (such as node-exporter, mysql-exporter) expose metrics in Prometheus format, allowing Prometheus to collect them.


Question 11

What is a Dashboard in Grafana?

Show explanation

Correct answer: A collection of visualization panels that display metrics and logs

Explanation: Grafana dashboards allow visualizing metrics through graphs, tables, and other panels for monitoring and analysis.


Question 12

What is an alerting rule in Prometheus?

Show explanation

Correct answer: A rule that defines when an alert should be triggered based on PromQL conditions

Explanation: Alerting rules define PromQL conditions that, when true, trigger alerts sent to Alertmanager.


Question 13

What is Jaeger?

Show explanation

Correct answer: A distributed tracing system for debugging and monitoring microservices

Explanation: Jaeger allows tracing requests across multiple microservices, visualizing the complete path of a request and identifying bottlenecks.


Question 14

What is a Metrics Server in Kubernetes?

Show explanation

Correct answer: An add-on that collects resource metrics (CPU, memory) from nodes and Pods

Explanation: Metrics Server collects resource metrics and exposes them via the Metrics API, enabling the use of HPA and kubectl top.


Question 15

What is the command to view the resource usage of a Pod?

Show explanation

Correct answer: kubectl top pod [pod-name]

Explanation: kubectl top pod displays the CPU and memory usage of a Pod. Requires Metrics Server to function.


Question 16

What is a Scrape in Prometheus?

Show explanation

Correct answer: The process of collecting metrics from an HTTP endpoint

Explanation: Prometheus scrapes (retrieves) metrics from HTTP endpoints exposing Prometheus-formatted metrics at regular intervals.


Question 17

What is a Log Aggregator?

Show explanation

Correct answer: A system that collects, stores, and allows searching logs from multiple sources

Explanation: Log aggregators (such as ELK Stack, Loki) centralize logs from all Pods, enabling centralized search and analysis.


Question 18

What is a Health Check in the context of monitoring?

Show explanation

Correct answer: A periodic check of the health of an application or service

Explanation: Health checks (Liveness, Readiness, Startup Probes) allow Kubernetes to verify application health and take automatic actions.


Question 19

What is an SLO (Service Level Objective)?

Show explanation

Correct answer: A measurable performance or availability objective for a service

Explanation: An SLO defines a measurable objective (e.g., 99.9% availability) that can be monitored via Prometheus and used to trigger alerts.


Question 20

What is the best practice for monitoring in production?

Show explanation

Correct answer: Monitor application, infrastructure, and business metrics, with appropriate alerts

Explanation: Comprehensive monitoring includes application metrics (latency, errors), infrastructure metrics (CPU, memory), and business metrics (revenue, active users), with alerts for critical issues.


Question 21

What is a Time Series in Prometheus?

Show explanation

Correct answer: A series of numerical values associated with timestamps

Explanation: Time series are series of data points (value, timestamp) that represent the evolution of a metric over time.


Question 22

What is the command to view the resource usage of a node?

Show explanation

Correct answer: kubectl top node [node-name]

Explanation: kubectl top node displays the CPU and memory usage of a node. Requires Metrics Server.


Question 23

What is a Log Shipper?

Show explanation

Correct answer: An agent that collects logs from Pods and sends them to an aggregation system

Explanation: Log shippers (such as Fluentd, Filebeat) collect logs from Pods and send them to aggregation systems like Elasticsearch or Loki.


Question 24

What is a Kubernetes Dashboard?

Show explanation

Correct answer: A web interface that provides an overview of the cluster and allows managing resources

Explanation: Kubernetes Dashboard is a web interface that allows viewing and managing cluster resources graphically.


Question 25

What is APM (Application Performance Monitoring)?

Show explanation

Correct answer: Monitoring application performance to identify bottlenecks

Explanation: APM monitors application performance (latency, throughput, errors) to identify and resolve performance issues.


Question 26

What is the difference between metrics and logs?

Show explanation

Correct answer: Metrics are aggregated numerical values, logs are detailed textual events

Explanation: Metrics are numerical values that can be aggregated and statistically analyzed, while logs are detailed textual events for debugging.


Question 27

What is a Trace in the context of observability?

Show explanation

Correct answer: A record of the complete path of a request across multiple services

Explanation: Traces allow following a request across multiple microservices, showing each step and the time spent in each service.


Question 28

What is the best practice for alerts?

Show explanation

Correct answer: Create actionable alerts for critical problems that require intervention

Explanation: Alerts should be actionable and target critical problems. Too many alerts cause alert fatigue and reduce their effectiveness.


Question 29

What is a custom Exporter?

Show explanation

Correct answer: An application you create to expose application-specific metrics in Prometheus format

Explanation: Custom exporters allow exposing business-specific metrics for your application, complementing standard system metrics.


Question 30

What is the best practice for log storage in production?

Show explanation

Correct answer: Centralize logs, define retention policies, and use indexing for efficient searching

Explanation: Logs should be centralized, indexed for fast searching, and have retention policies to manage storage costs.


Quiz Results

Congratulations on completing the Module 11 quiz!

Score:

  • 25-30 correct answers: Excellent! You have mastered monitoring and observability.
  • 20-24 correct answers: Very good! Review the concepts where you had difficulties.
  • 15-19 correct answers: Good! Review the chapters on Prometheus, Grafana, and monitoring.
  • Less than 15: Recommended to review the module before continuing.

Quiz created on: December 2024