Skip to content

Instantly share code, notes, and snippets.

@jhedden
Created January 3, 2022 16:16
Show Gist options
  • Save jhedden/877b71537833df7875b5a16cb0b4284f to your computer and use it in GitHub Desktop.
Save jhedden/877b71537833df7875b5a16cb0b4284f to your computer and use it in GitHub Desktop.
Prometheus curl snippets
# 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