suggestion: add to exporter data set with runner activity
It will be nice to have info about runner activity. I have made graphql query to run from graphql-explorer:
query{runners(first: 50, after: "", sort: CREATED_ASC) {
count
nodes {
id
jobExecutionStatus
active
jobCount
status
tagList
}
pageInfo {
hasNextPage
endCursor
}
}}
Example response:
{
"data": {
"runners": {
"count": 382,
"nodes": [
{
"id": "gid://gitlab/Ci::Runner/1",
"jobExecutionStatus": "IDLE",
"active": true,
"jobCount": 1001,
"status": "ONLINE",
"tagList": [
"some_nice_tag",
"another_nice_tag",
]
}
]
}
}
}
In openmetrics format it will be useful:
- gitlab_runner_job_status - field
jobExecutionStatus
RUNNING/IDLE (1/0) in value - gitlab_runner_status - field
active
true/false (1/0) in value - gitlab_runner_job_status - field
jobCount
in value - gitlab_runner_metadata_tag_list - always 1 in value to have option left join in promql
Metrics can be like:
gitlab_runner_job_status{id="1"} 0
gitlab_runner_status{id="1"} 1
gitlab_runner_job_count{id="1"} 1001
gitlab_runner_metadata_tag_list{id="1", tag="some_nice_tag"} 1
gitlab_runner_metadata_tag_list{id="1", tag="another_nice_tag"} 1
Optional - it can be useful to add projects and groups in metadata vectors.
With data we can see runners activity and know when to scale up or down the runners in groups/projects by tags.
Edited by Vyacheslav Vershinin