Bird
0
0

Given this snippet of a ServiceMonitor YAML, what is the scrape interval Prometheus will use?

medium📝 Command Output Q13 of 15
Kubernetes - Monitoring and Logging
Given this snippet of a ServiceMonitor YAML, what is the scrape interval Prometheus will use?
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: example-monitor
spec:
  endpoints:
  - port: web
    interval: 15s
  selector:
    matchLabels:
      app: example
A5 seconds
B30 seconds
C15 seconds
D1 minute
Step-by-Step Solution
Solution:
  1. Step 1: Locate the interval field in YAML

    The interval is set under endpoints as 'interval: 15s'.
  2. Step 2: Understand interval meaning

    This means Prometheus scrapes metrics every 15 seconds from the specified port.
  3. Final Answer:

    15 seconds -> Option C
  4. Quick Check:

    interval: 15s means 15 seconds [OK]
Quick Trick: Check 'interval' value under endpoints [OK]
Common Mistakes:
  • Ignoring the interval field and guessing default
  • Confusing seconds with minutes
  • Assuming interval is global, not per endpoint

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes