Getting Gitlab runner details for all runners

Viewed 372

I'm trying to get to the contacted_at field for all runners on a gitlab instance and get the values inside Logstash.

gitlab.example.com/api/v4/runners/all gives an abbreviated list of all runners, but the details are hidden unless they are called by a specific ID. Is there a way to do this without specifying each and every runner's ID?

1 Answers

GitLab 14.8 (February 2022) comes with:

View read-only runner details in the Admin Area

You can now view the details of a runner in the Admin Area. This new view aims to provide the most valuable information about each runner associated with your GitLab instance. You can view last contact, runner version, and assigned projects, which is now paginated. In the new paginated jobs tab, you can also view a full list of jobs run by the Runner, which helps you view, search, and analyze CI/CD job execution history quickly.

https://about.gitlab.com/images/14_8/admin-runner-details-read-only-view-2.png -- View read-only runner details in the Admin Area

See Documentation and Issue.

This is not what you want, but the associated issue for that GUI feature, issue 347856, includes multiple GraphQL API evolutions which could be of interest.

Maybe that means a GraphQL query is now possible to get much more information for all runners, since this is what the GUI is using to display that new list.


And: See GitLab 15.0 (May 2022)

View more details about each runner

Previously, if wanted an at-a-glance view of a runner’s relevant information, you had to switch between screens or even use the API to retrieve the details. Now, administrators can view the runner’s executor, architecture, and platform on the runner’s detail view. These details can help you quickly determine essential details, which are critical for troubleshooting issues or managing day-to-day operations and maintenance tasks.

https://about.gitlab.com/images/15_0/runners-detail-new-attributes-2.png -- View more details about each runner

See Documentation and Issue.

Related