You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?
Monitoring & Observability commands
One page per command. What it does, when to use it, how risky it is.
Check rules and configs
promtool check configChecks prometheus.yml, and the rule files it names, before you load them.Risk: Safepromtool check rulesChecks a rule file: the YAML, every expr, and every name.Risk: Safeamtool check-configChecks an Alertmanager config and lists what it found: routes, receivers, inhibit rules.Risk: Safe
Ask Prometheus
curlAsks Prometheus if it is ready to answer queries.Risk: SafecurlReads a target's numbers as plain text, the same page Prometheus scrapes.Risk: SafecurlAsks blackbox exporter to knock on a URL once and report what happened.Risk: SafecurlRuns a PromQL query through Prometheus's HTTP API and prints the answer as JSON.Risk: Safepromtool query instantRuns one PromQL query against a server and prints one line per series.Risk: Safe
Alerts and silences
amtool config routes testSays which receiver gets an alert with these labels. Nothing is sent.Risk: Safeamtool silence addMutes matching alerts until the time runs out. Prints the silence ID.Risk: Careful
Logs and traces
logcli queryAsks Loki a LogQL question from the terminal and prints the matching diary lines.Risk: Safeotelcol-contrib validateChecks an OpenTelemetry Collector config without starting it. No output means it is fine.Risk: Safe