Monitor github actions runner with telegraf + prometheus #1184
Unanswered
Mic92
asked this question in
Show and tell
Replies: 2 comments
-
|
I also recently learned about https://github.com/Spendesk/github-actions-exporter |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
#1116 probably worth linking the existing observability issue here too as it is loosely related to this wiki and may down the road have related comments |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The github actions runner API can be used to external monitor
if your github actions runner are online.
The endpoint for an organisation is
https://api.github.com/orgs/<ORG>/actions/runners,where
ORGis the name of the origanisation.Accessing the API requires github token of a github account that has admin access in the organisation (admin:org scope).
It can be generated here: https://github.com/settings/tokens
The following telegraf configuration will periodically poll this API endpoint:
From telegraf it can be exported to prometheus or influxdb.
The following example alert condition in prometheus checks if there at least two
online github runner:
count(http_busy{status="online"}) >= 2Cheers!
Beta Was this translation helpful? Give feedback.
All reactions