Skip to content

Instantly share code, notes, and snippets.

@movd
Created November 6, 2020 11:57
Show Gist options
  • Save movd/b996023cd3b122fe91b53a716d3ce817 to your computer and use it in GitHub Desktop.
Save movd/b996023cd3b122fe91b53a716d3ce817 to your computer and use it in GitHub Desktop.
Hot reload Prometheus only on working config
#!/usr/bin/env bash
ls /etc/prometheus/*.yml \
| entr bash -c "promtool check config /etc/prometheus/prometheus.yml \
&& curl -X POST 'http://localhost:9090/-/reload'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment