Created
January 3, 2022 16:16
-
-
Save jhedden/877b71537833df7875b5a16cb0b4284f to your computer and use it in GitHub Desktop.
Prometheus curl snippets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# List all unhealthy targets | |
curl -s 'http://0.0.0.0/api/v1/targets' | jq -r '.data.activeTargets[] | select(.health=="down") | [.labels.job, .labels.app, .lastError] | @csv' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment