INTERVIEW PREP
Interview questions
570 questions from real DevOps, SRE, platform engineering and MLOps interviews, with the answer an interviewer wants to hear. Try answering out loud first, then open the model answer.
Showing 166–180 of 224 questions
166.What does rate() do?MidMonitoring with Prometheus, Grafana & Datadog
It turns a counter into growth per second over a time window, such as rate(x[5m]). Use it on counters, not gauges.
167.How do you get a latency percentile in PromQL?MidMonitoring with Prometheus, Grafana & Datadog
Use a histogram metric: histogram_quantile(0.95, sum by (le) (rate(x_bucket[5m]))). Do not average percentiles from different servers.
168.What is an exporter?MidMonitoring with Prometheus, Grafana & Datadog
A small program that reads data from software you cannot change, such as a database or Linux, and exposes it as a /metrics page for Prometheus.
169.What is the job of Alertmanager?MidMonitoring with Prometheus, Grafana & Datadog
Prometheus decides when an alert fires. Alertmanager groups alerts, mutes silenced ones, and routes them to Slack, email or a pager.
170.What makes a good alert?MidMonitoring with Prometheus, Grafana & Datadog
It reports a symptom users feel, needs a human to act, has a for: duration to avoid spikes, and links to a runbook. Alerts that nobody acts on should be fixed or removed.
171.How is Loki different from Elasticsearch?MidMonitoring with Prometheus, Grafana & Datadog
Loki indexes only labels, so it is cheap and works well with Prometheus-style labels. Elasticsearch indexes all the text, so full-text search is rich but costs more storage and memory.
172.What is a trace and a span?MidMonitoring with Prometheus, Grafana & Datadog
A trace is the full journey of one request. A span is one step inside it, with a start time and duration. Spans nest to show who called whom.
173.How do you monitor an app on Kubernetes?MidMonitoring with Prometheus, Grafana & Datadog
Install kube-prometheus-stack, expose a /metrics port on the app, and create a ServiceMonitor that selects its Service. Prometheus then scrapes the pods as they come and go.
174.Why is Prometheus pull-based, and when do you push instead?MidMonitoring with Prometheus, Grafana & Datadog
Pulling lets Prometheus see at once when a target is down, because the scrape fails, and you do not have to configure each app with the server address. Push is only for short-lived batch jobs that end before a scrape, using the Pushgateway.
175.What is a recording rule?MidMonitoring with Prometheus, Grafana & Datadog
A rule that Prometheus evaluates on a schedule and stores as a new metric. Use it for heavy queries that you use often, so dashboards load fast and alerts stay simple.
176.A Grafana panel shows no data. How do you debug it?MidMonitoring with Prometheus, Grafana & Datadog
Check the time range and data source, run the same query in Prometheus or Explore, see if the target is up on the Targets page, check that the metric and label names are spelled right, and look at the query's rate window against the scrape interval.
177.How do you avoid a huge Datadog bill?MidMonitoring with Prometheus, Grafana & Datadog
Control the three big drivers: custom metrics (avoid high-cardinality tags like user IDs), indexed logs (exclusion filters, sampling, archives in cheap storage) and APM (sampling, keep errors). Review Plan & Usage monthly and tag everything with team so costs can be traced.
178.What is unified service tagging in Datadog?MidMonitoring with Prometheus, Grafana & Datadog
Using the same env, service and version tags on metrics, logs and traces (for example through DD_ENV, DD_SERVICE and DD_VERSION). It lets you jump from a slow trace to the matching logs and compare behavior before and after a deploy.
179.What is an SBOM and why keep one for each release?MidDevSecOps
A Software Bill of Materials lists the components in a build. When a new vulnerability such as Log4Shell appears, you can search your SBOMs and know which products are affected within minutes.
180.Why scan the lock file for dependencies?MidDevSecOps
The lock file shows the exact versions in use, including transitive dependencies. Scanning only the manifest can miss libraries that your libraries pull in.