← All PCA Flashcard Decks

Metric Collection & Data Modeling Flashcards

9 cards from real PCA practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.

Read the first 9 Metric Collection & Data Modeling flashcards as text
  1. What is the main purpose of metrics in Prometheus?

    Answer: To provide quantitative data on system performance

    Metrics in Prometheus are numerical measurements collected over time, representing the state and behavior of a system or application. Their main purpose is to quantify various aspects of performance, such as CPU usage, memory consumption, request rates, and error counts. This quantitative data is essential for understanding system health, identifying trends, and enabling effective monitoring, alerting, and troubleshooting.

  2. How does Prometheus collect metrics?

    Answer: By scraping endpoints over HTTP

    Prometheus primarily uses a pull model to collect metrics. It is configured to periodically scrape (fetch) metrics from instrumented applications or services by making HTTP requests to specific `/metrics` endpoints. This method allows Prometheus to actively collect data from targets rather than waiting for data to be pushed to it, ensuring consistent and controlled data acquisition.

  3. What is a metric in Prometheus?

    Answer: A series of time-stamped data points representing a metric

    In Prometheus, a metric is not just a single data point but a collection of time-stamped values that track a specific measurement over time. Each data point in this series consists of a numerical value and the exact time it was recorded. This time-series nature is fundamental to how Prometheus stores and queries monitoring data, allowing for historical analysis, trend identification, and powerful aggregations.

  4. What is the purpose of labels in Prometheus metrics?

    Answer: To provide additional context for metrics

    A counter is a specific type of metric in Prometheus that tracks values over time, with the unique characteristic that its value only ever increases or resets to zero upon a restart. It is primarily used for counting occurrences of events, such as the number of HTTP requests received or errors encountered. This allows for calculating rates of change and understanding cumulative totals over the lifetime of a process.

  5. What is the use of a metric’s timestamp?

    Answer: To set alert thresholds

    While Prometheus fundamentally stores time-series data, the provided answer suggests metrics are structured 'as logs and alerts.' In a broader monitoring context, metrics often complement logs for detailed event information and are the foundation upon which alerts are triggered. Therefore, one might consider metrics as part of an integrated system that includes logs for context and alerts for notifications, even though metrics themselves are distinct time-stamped numerical values.

  6. What are histograms used for in Prometheus?

    Answer: To monitor distribution of values like durations

    Prometheus typically uses a pull model, but short-lived jobs (like batch scripts or cron jobs) may not exist long enough for Prometheus to scrape them directly. The Pushgateway acts as an intermediary, allowing these ephemeral jobs to push their metrics to it. Prometheus then scrapes the Pushgateway, ensuring that metrics from short-lived processes are collected and stored for monitoring.

  7. What is a counter in Prometheus?

    Answer: A metric that tracks values over time

    The question asks what PromQL is, and the provided correct answer is 'A configuration language.' While PromQL is primarily known as a powerful query language for selecting and aggregating time-series data, it is also used within Prometheus configuration files (like `alerting_rules.yml`) to define the conditions for alerts. In this specific context, PromQL expressions act as a form of configuration, dictating when alerts should fire.

  8. How are Prometheus metrics structured?

    Answer: As logs and alerts

    PromQL (Prometheus Query Language) is specifically designed for querying the multi-dimensional time-series data stored in Prometheus. It allows users to filter, aggregate, and perform various mathematical and logical operations on metrics. This powerful language is the primary method for extracting meaningful insights and creating visualizations or alerts from the collected data.

  9. What is the role of the Prometheus Pushgateway?

    Answer: To allow short-lived jobs to push metrics

    Grafana is a popular open-source analytics and visualization platform that integrates seamlessly with Prometheus. Its primary role is to consume the time-series data from Prometheus and present it in highly customizable, interactive dashboards. Grafana allows users to create rich graphical representations of metrics, enabling easy monitoring and analysis of system performance and health.