Reload Prometheus config

Hot reload Prometheus config and rules without restart

curl -X POST http://prometheus:9090/-/reload

tool
prometheus30 commands
tags
prometheus

More prometheus commands

  • curl -s http://prometheus:9090/api/v1/alerts | jq '.data.alerts[] | select(.state=="firing") | {name: .labels.alertname, severity: .labels.severity}'

    Show only firing alerts with name and severity

  • curl -s http://prometheus:9090/api/v1/label/__name__/values | jq '.data | length, .[0:20]'

    Count total metric names and preview first 20

  • count by (job) ({__name__=~".+"})

    PromQL: count active time series grouped by job label

  • amtool silence add alertname=HighMemory --duration=2h --comment='Investigating'

    Create an Alertmanager silence for 2 hours

  • curl -s http://prometheus:9090/api/v1/status/tsdb | jq '{head_chunks: .data.headStats.numChunks, series: .data.headStats.numSeries}'

    View TSDB head stats: chunks and active series

all 30 prometheus commands