CircleCI-Public / circleci-cli

Use CircleCI from the command line
https://circleci-public.github.io/circleci-cli/
MIT License
405 stars 233 forks source link

[Feature Request] Add number of Active tasks in "runner instance list" command #1016

Open ADUDevEx opened 7 months ago

ADUDevEx commented 7 months ago

What problem does this feature solve?:

This feature could be used in a blackbox exporter to monitor the number of active tasks on runners. (Could help raise an alert in a prometheus stack in case we reach the maximum number of active tasks)

Provide an example:

+-------------------------+--------------------+-------------------------------------------------+----------------------+----------------------+----------------------+----+--------------------+----------------------+
|          NAME           |   RESOURCE CLASS   |                    HOSTNAME                     |   FIRST CONNECTED    |    LAST CONNECTED    |      LAST USED       | IP |      VERSION       |     ACTIVE TASKS     |
+-------------------------+--------------------+-------------------------------------------------+----------------------+----------------------+----------------------+----+--------------------+----------------------+
| namespace-circle-runner | namespace/xlarge   | circleci-agent-container-agent-xxxxxxxxxx-yyyyy | 2023-09-21T11:59:04Z | 2023-11-10T16:20:05Z | 2023-11-10T16:13:30Z |    | 3.0.7-3109-1cf50bb |          20          |
+-------------------------+--------------------+-------------------------------------------------+----------------------+----------------------+----------------------+----+--------------------+----------------------+