PCA 题库

Prometheus Certified Associate(PCA)

  1. Which one of the following item should not belong to metric?
  2. username ✅
  3. response code
  4. environment
  5. Server name
  6. How can we add Service Discovery labels to targets?
  7. Via honor_labels.
  8. Via federation.
  9. Via metric_relabel_configs.
  10. Via relabel_configs ✅.
  11. Which of following is used to push metrics to Prometheus?
  12. Exporter
  13. Node Exporter
  14. Pullgateway
  15. Pushgateway ✅
  16. How does Prometheus help trouybleshoot performance degradation?
  17. Prometheus provides long term storage. ✅(?)
  18. Prometheus provides an easy GUI for events/messages search.
  19. Prometheus signidicantly simplifies tracing and application debugging.
  20. Prometheus stores detailed metrics and counters.
  21. A Service level Objective(SLO) is:
  22. an agreement whithin an SLI about a specific measurement.
  23. an agreement between provider and client.
  24. a goal whithin an SLA about a specific metric like response time. ✅
  25. an agreement whithin an SLI about a specific indicator.
  26. Which tool provides the answer to question: “ What was our 99.9% response time last month”**?**
  27. SLI’s
  28. Error budget.
  29. SLO’s ✅
  30. SLA’s
  31. What is a trace**?**
  32. Trace is a numerical measurement about a service,captured at runtime.
  33. Trace is a set of events triggered by a single logical operation,consolidated across various components of an application.✅
  34. Trace is a simple mechanism for propagating name/value pairs.
  35. Trace is a timestamped text record,either structured(recommended) or unstructured,with metadata.
  36. What metric represents a single numerical value that can arbitrarily go up and down?
  37. counter
  38. summary
  39. gauge ✅
  40. histogram
  41. What are the changes in numerical data recorded over time called?
  42. time table
  43. time series ✅
  44. data dashboard
  45. metrics
  46. An SLI is a service level indicator defined as a(n)__measure of some aspect of the level of service that is provided?
  47. ephemeral
  48. quantitative ✅
  49. significant
  50. qualitative
  51. You’d like get alerts when one of your production Linux servers goes down. What Prometheus components woild you use?
  52. Prometheus server,alert exporter,server manager
  53. Kubernetes,Prometheus server,Grafana
  54. Prometheus server,node exporter,alert manager ✅
  55. Push Gateway,node manager,Prometheus server
  56. What is defference beween a counter and a gauge?
  57. Counters ard only incremented,while gauge can go up and down. ✅
  58. Counters and gauges are different names for the same thing.
  59. Counters change value on each scrape and gauges remain static.
  60. Counters have no labels while gauges can have many labels.
  61. How can you use the **Prometheus federation**?
  62. You can use the federation to change metric labels in the Prometheus server.
  63. You can use the federation to scrape selected time series from another Prometheus server. ✅
  64. You can use the federation to control scraping jobs in another Prometheus server.
  65. You can use the federation to probe applications from the Prometheus server.
  66. You’d like monitor a short lived batch job. What **Prometheus component would you use**?
  67. PullGateway
  68. PushGateway ✅
  69. PullProxy
  70. PushProxy
  71. What dose _scrapeinterval configure in **Prometheus**?
  72. It defines how frequently to evaluate rules.
  73. It defines how frequently to scrape targets. ✅
  74. It defines how often to send alerts.
  75. It defines how often to refresh metrics.
  76. Which of the following metric is unsuitable for **Prometheus setup**?
  77. user_last_login_timestamp_seconds{email="john.doe@example.com"}
  78. http_response_total{handler="/static/*filepath"}
  79. prometheus_engine_query_log_enabled
  80. Prohttp_metric_handler_requests_total{code="500"} ✅
  81. What is the requirement to use the /-/reload HTTP endpoint to reload Prometheus configuration file?
  82. Start Prometheus with --web.enable-lifecycle ✅
  83. Send a SIGHUP signal to Prometheus
  84. Start Prometheus with --web.enble-admin-api
  85. Add enable_reloads: true to the configuration file
  86. What is** api_http_requests_total** in the following metric?

api_http_requests_total{method="POST", hander="/messages"}

  1. "api_http_requests_total" is metric name. ✅
  2. "api_http_requests_total" is metric type.
  3. "api_http_requests_total" is metric label name.
  4. "api_http_requests_total" is metric field.
  5. Which mechanism can be used to automatically adjust the amount of resources for an application?
  6. You configure retention for all metrics via Prometheus command-line flags. ✅
  7. You configure retention for each scraping job in the Prometheus command-line flags.
  8. You configure retention for each service-discovery instance in the Prometheus configuration file.
  9. Metric retention is configured in the Prometheus configuration file.
  10. Prometheus fundamentally stores all data as _____**?**
  11. input-output
  12. artificial neural network
  13. simultaneous equations
  14. time series ✅
  15. Which of the following filesystems is unsupported by **Prometheus**?
  16. NFS ✅
  17. NTFS
  18. ext4
  19. XFS
  20. Which PromQL expression computes how many requests in total are currently in-flight for the following time series data?

apiserver_current_inflight_requests{instance="1"} 5
apiserver_current_inflight_requests{instance="2"} 7

  1. min(apiserver_current_inflight_requests)
  2. sum_over_time(apiserver_current_inflight_requests[10m]) ✅
  3. sum(apiserver_current_inflight_requests[10m])
  4. max(apiserver_current_inflight_requests[10m])
  5. What is the difference between rate and irate?
  6. rate takes a range vector as argument.irate takes an instant vector as argument.
  7. rate is valid PromQL function.irate doesn’t exist in PromQL.
  8. rate for counter metrics,and irate is for gauge metrics.
  9. rate uses all the samples.irate only uses last 2 samples of the range selector. ✅
  10. With the following metrics over the last 5 minutes:

up{instance="localhost"} 1 1 1 1 1
up{instance="server1"} 1 0 0 0 0
What does the following query return: min_over_time(up[5m])?

  1. up{instance="server1"} 0

  2. {instance="localhost"} 1 ✅

    {instance="server1"} 0

  3. up{instance="localhost"} 1

    up{instance="server1"} 0

  4. {instance="server1"} 0

  5. How do you calculate the averange request duration during the last 5 minutes a histogram or summary called http_request_duration_seconds?

  6. rate(http_request_duration_seconds_total[5m])/rate(http_request_duration_seconds_count[5m])

  7. rate(http_request_duration_seconds_sum[5m])/rate(http_request_duration_seconds_average[5m])

  8. rate(http_request_duration_seconds_sum[5m])/rate(http_request_duration_seconds_count[5m]) ✅

  9. rate(http_request_duration_seconds_total[5m])/rate(http_request_duration_seconds_average[5m])

  10. How many different metric names can be produced by a histogram?

  11. 2,with suffixes _sun and _count.

  12. 3,with suffixes _sun ,_count and _bucket. ✅(? 应该是 _sum)

  13. 3,with suffixes _sun ,_count and _quantile.

  14. 2,with suffixes _sum and _le.

  15. Which of the following expressions selects the value of metric go_goroutines for the label instance with value localhost:9090 and job with value prometheus?

  16. go_goroutines [ instance="localhost:9090" job="prometheus" ]

  17. go_goroutines { instance="localhost:9090", job="prometheus" } ✅

  18. go_goroutines [ instance="localhost:9090", job="prometheus" ]

  19. go_goroutines { instance="localhost:9090" job="prometheus" }

  20. Which of the following statements is NOT correct?

  21. Histogram metrics are aggregatable.

  22. Summary metrics are aggregatable.

  23. Summary metric type is computed on the client-side.

  24. Histogram metric type is computed on the server-side. ✅

  25. What function calculates the **φ**-quantile from a histogram?

  26. avg_over_time()

  27. histogram()

  28. predict_linear()

  29. histogram_quantitle() ✅

  30. Which of the following expressions selects all the values of a metric "up" in the last 5 minutes?

  31. up@5m

  32. up[5m] ✅

  33. up for 5m

  34. up offset 5m

  35. Which of the following is an invalid **@modifier** expression?

  36. go_goroutines @end()

  37. sum(http_requests_total{method="GET"}) @1609746000 ✅

  38. sum(http_requests_total{method="GET"} @1609746000)

  39. go_goroutines @start()

  40. What dose thefollowing PromQL query return?

sum(up)/count(up)
Give the following metrics:
up{instance="localhost"} 1
up{instance="server1"} 0

  1. up 0.5

  2. {instance="localhost"} 1

    {instance="server1"} 0

  3. {instance="localhost"} 1

    {instance="server1"} NaN

  4. {} 0.5 ✅

  5. if the vector selector foo[5m] contains 1 1 NaN 0,what would max_over_time(foo[5m]) return?

A. It errors out.
B. No answer.
C. 1 ✅
D. NaN

  1. How canyou see the timestamp of collected samples in PromQL?
  2. With the time() function.
  3. With the timestamp() function. ✅
  4. This data is not available via PromQL.
  5. With the a query that includes the last_scrape_timestamp_seconds metric.
  6. Which expression calculates the average uptime od targets over the last hour?
  7. avg(up-1h)
  8. avg(up[1h])
  9. average_over_time(up[1h])
  10. avg_over_time(up[1h]) ✅
  11. Which of the following PromQl query is invalid?
  12. max without (instance, job) up
  13. max without (instance) up
  14. max on (instance) (up) ✅
  15. max by (instance) up
  16. Which metric type uses the delta() function?
  17. Info
  18. Gauge ✅
  19. Histogram
  20. Counter
  21. Which PromQL statement returns the average free bytes of the filesystems over the last hour?
  22. sum_over_time(node_filesystem_avail_bytes[1h])
  23. avg(node_filesystem_avail_bytes[1h])
  24. sum(node_filesystem_avail_bytes[1h])
  25. avg_over_time(node_filesystem_avail_bytes[1h]) ✅
  26. Which of the following is valid time duration in PromQL?
  27. 1H30
  28. 1w ✅
  29. 5min
  30. 3600
  31. How can you use Prometheus blackbox_exporter?
  32. You can use it to collect metrics from the node.
  33. You can use it to collect resource metrics from the application.
  34. You can use it to probe endpoint over HTTP,HTTPS,and other protocols. ✅
  35. You can use it to instrument applications with metrics.
  36. Which function is available on gauges and counters?
  37. Set
  38. Decrease
  39. Increase ✅
  40. Substract
  41. What is a Prometheus registry?
  42. A registry is a set of erxporters install in your infrastructure to expose metric.
  43. A registry is a collection of targets for the same job,which can be connected to Prometheus using HTTP service discovery.
  44. A registry is a set of defined metrics a client library exposes to Prometheus.✅
  45. A registry is a protocol collect TLS keys to secure metrics collection from your application to Prometheus server.
  46. What exporter enables monitoring of Linux machines?
  47. pushgateway
  48. linux_exporter
  49. host_exporter
  50. node_exporter ✅
  51. What exporter would you use to monitor network routers,switches,or printers?
  52. XMPP Exporter
  53. SCTP Exporter
  54. SNMP Exporter ✅
  55. SMTP Exporter
  56. What is a Prometheus client library?
  57. It is a library to convert from the OpenMetrics format to the Prometheus format.
  58. It is a library to extract metrics from existing exporters.
  59. It is a library to send metrics to remove write endpoints.
  60. It is a library to instrument your application with Prometheus metrics. ✅
  61. How would you correctly name a metric that provides metadata information about the binary?
  62. app_build_desc
  63. app_metadata
  64. app_build_info ✅
  65. app_build
  66. What is the preferred unit for time duration in **Prometheus**?
  67. It depends on the scale
  68. seconds
  69. milliseconds ✅
  70. nanoseconds
  71. How would you name a metric that tracks HTTP request duration?
  72. http_request_duration_seconds ✅
  73. http_request_duration
  74. http_request_latency
  75. request_duration_seconds
  76. Which receiver will get an alert when the following alert is firing?

Labels:
- alertname = MongoDBErrorWarning
- severity = warning
- cluster = ops
- service = mangodb

  1. team-X-mail
  2. team-X-pager
  3. team-Y-pager
  4. team-Y-mails ✅
  5. What popular Open Source project is commonly used to visualize Prometheus data?
  6. Visual Studio Code
  7. Grafana ✅
  8. Alert Manager
  9. Kubernetes Dashboard
  10. What is Inhibition?
  11. The concept of suppressing notification for some alerts if other specified alerts are already firing. ✅
  12. The Alertmanager support for a special configuration to create a cluster for high availability.
  13. A way to categorize alerts of similar nature info a single notification.
  14. A straigghtforward configuration to mute alerts for a given time.
  15. What is considered the best practice when working with alerting notifications?
  16. Have as few alerts as possible by alerting only when symptoms might become externally visible.
  17. Have as many alerts as possible to catch minor problems before they become outages.
  18. Make sure to generate alerts on every metric of every component of the stack.
  19. Minor alerts are as important as major alerts and should be treated with equal care. ✅
  20. which receiver will get an alert when the following alert is firing?

Labels:
- alertname = ApplicationIsDown
- severity = critical
- cluster = ops
- service = baz
Given the following Alertmanager configuration:

  1. team-X-mail
  2. team-X-pager ✅
  3. team-Y-pager
  4. team-Y-mails
  5. What are Inhibition rules?
  6. Inhibition rules inspect alerts when a matching set of alerts is firing.
  7. Inhibition rules repeat a set of alerts when another matching alert is firing.
  8. Inhibition rules mute a set of alerts when another matching alert is firing.✅
  9. Inhibition rules inject a new set of alerts when a matching alert is firing.
  10. What can be configured when creating a Prometheus data source in Grafana?
  11. You can configure the avaluation interval.
  12. You can configure the alerting interval.
  13. You can configure the scrape interval. ✅
  14. You can configure the retention interval.
  15. What is metamonitoring?
  16. Metamonitoring is monitoring that covers 100% of a service.
  17. Metamonitoring is monitoring of the monitoring infrastructure. ✅
  18. Metamonitoring is monitoring social networks for end user complains about quality of service.
  19. Metamonitoring is the monitoring of non-IT systems.
  20. When can you use the Grafana Heatmap panel?
  21. You can use it to graph a gauge metric.
  22. You can use it to graph a histogram metric. ✅
  23. You can use it to graph a counter metric.
  24. You can use it to graph an info metric.
  25. What is the difference between a symptom and a cause?
  26. Causes happen before symptoms.
  27. Symptoms are about end users impact,causes are technical issues. ✅
  28. Symptoms can be ignored and are informational,unlike causes.
  29. Symptoms are not real issue,causes are more important.
  30. Which field in alerting rules files indicates the time an alert needs to go from pending to firing state?
  31. offset
  32. expr
  33. fire_after
  34. for ✅
  35. How would you add a text from the instance label to the alert’s description for the following alert?

alert: InstanceDown
expr: up == 0
for: 5m
labels:
serveriry: page
annotations:
description: "Instance INSTANCE_NAME_HERE down"

  1. Use $labels.instance instead of INSTANCE_NAME_HERE
  2. Use "labels.instance" instead of INSTANCE_NAME_HERE
  3. Use {{$labels.instance}} instead of INSTANCE_NAME_HERE ✅
  4. Use #labels.instance instead of INSTANCE_NAME_HERE