Created
June 30, 2025 11:56
-
-
Save cfstras/7bd4511bd1176d908091683d4a3c72d0 to your computer and use it in GitHub Desktop.
Cardinality overview of prometheus metrics
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
#!/bin/bash -euo pipefail | |
## Gives you a nice overview over the total timeseries cardinality of a prometheus endpoint. | |
curl -fsSL http://localhost:9100/metrics | grep -v '^#' | cut -d'{' -f 1 | cut -d' ' -f 1 | sort | uniq -c | sort -gr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment