Skip to main content
RunBook Academy

← All runbooks in Observability

low riskinformational~30 min

Runbook: Add a Scrape Target

1 · Prerequisites

Confirm every item is in place before any state change.

  • Prometheus server
  • New target host or service

2 · Pre-checks

Read-only diagnostic commands. If any of these don't match expected output, stop and investigate further.

  • · Confirm target host:port
  • · Confirm /metrics endpoint exists

3 · Procedure

Execute each step in order. Verify the expected output of a step before moving to the next.

  1. 1Edit /etc/prometheus/prometheus.yml
  2. 2Add a scrape_configs entry
  3. 3promtool check config /etc/prometheus/prometheus.yml
  4. 4curl -X POST http://prometheus:9090/-/reload (SIGHUP if not enabled)
  5. 5Verify target is up in /api/v1/targets

4 · Verification

Confirm the procedure actually fixed the problem.

  • up{job=<new>} == 1
  • The new metric appears in /api/v1/query

5 · Rollback

If verification fails, undo the procedure in reverse order.

  • Revert the YAML change
  • Reload with the previous configuration

6 · Escalation

When the runbook isn't enough, contact:

  • · Escalate if the target is critical and metrics are absent
  • · Coordinate change with the team owning the target

Purpose

Add a Scrape Target

When to use this runbook

Use this runbook when the operator needs a guided procedure to handle the situation described above.

Pre-checks

Before starting the procedure, confirm the prerequisites and pre-checks are met. The structured lists are rendered from the frontmatter by the page layout.

Procedure

Follow the steps from the frontmatter procedure steps. The page layout renders the steps as a checklist with copy-to-clipboard affordances.

Verification

After the procedure, the structured verification items from the frontmatter are rendered as a checklist.

Rollback

If the procedure fails or makes things worse, follow the structured rollback steps from the frontmatter.

Escalation

The structured escalation path is rendered from the frontmatter. Use it if the operator cannot complete the procedure safely.

References

  1. Prometheus documentation
  2. Grafana documentation
  3. Loki documentation
  4. Tempo documentation