How to Reload Prometheus 🔁

Option #1 - Prometheus API

Providing you're running Prometheus with the Lifecycle Management API enabled (using --web.enable-lifecycle flag), then to restart Prometheus, you can simply just sent a POST request to the /reload endpoint.

For example: curl -X POST http://localhost:9090/-/reload
Depending on your setup, you may need to change localhost to your IP, update the port, or specify authentication headers


Option #2 - Signal Hang Up

If you don't have the management API enabled, but to have direct access to the box, you can simply just send a SIGHUP command to the Prometheus process.

  1. Find the PID of a Prometheus's process: pgrep prometheus
  2. Reload that process: kill -HUP [pid]