Created
July 20, 2025 16:54
-
-
Save adamlogic/539612a55e61f6d5c0c73c3693543104 to your computer and use it in GitHub Desktop.
Show Heroku router distribution amongst dynos
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
brew install angle-grinder | |
heroku logs -t -d router -a app-name | agrind '* | |
| parse regex "(?P<timestamp>\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{6})" | |
| timeslice(parseDate(timestamp)) 1m as time | |
| logfmt | |
| count as reqs, | |
count(at == "error") as errors, | |
avg(connect) as avg_connect, | |
avg(service) as avg_service | |
by time, dyno | |
| sort by time desc, dyno' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment