|
2 | 2 |
|
3 | 3 | This is one of the features in GARM that I really love having. For one thing, it's community contributed and for another, it really adds value to the project. It allows us to create some pretty nice visualizations of what is happening with GARM. |
4 | 4 |
|
5 | | -At the moment there are only three meaningful metrics being collected, besides the default ones that the prometheus golang package enables by default. These are: |
| 5 | +## Common metrics |
6 | 6 |
|
7 | | -* `garm_health` - This is a gauge that is set to 1 if GARM is healthy and 0 if it is not. This is useful for alerting. |
8 | | -* `garm_runner_status` - This is a gauge value that gives us details about the runners garm spawns |
9 | | -* `garm_webhooks_received` - This is a counter that increments every time GARM receives a webhook from GitHub. |
| 7 | +| Metric name | Type | Labels | Description | |
| 8 | +|--------------------------|---------|-------------------------------------------------------------------|------------------------------------------------------------------------------------------------------| |
| 9 | +| `garm_health` | Gauge | `controller_id`=<controller id> <br>`name`=<hostname> | This is a gauge that is set to 1 if GARM is healthy and 0 if it is not. This is useful for alerting. | |
| 10 | +| `garm_webhooks_received` | Counter | `controller_id`=<controller id> <br>`name`=<hostname> | This is a counter that increments every time GARM receives a webhook from GitHub. | |
| 11 | + |
| 12 | +## Enterprise metrics |
| 13 | + |
| 14 | +| Metric name | Type | Labels | Description | |
| 15 | +|---------------------------------------|-------|-------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------| |
| 16 | +| `garm_enterprise_info` | Gauge | `id`=<enterprise id> <br>`name`=<enterprise name> | This is a gauge that is set to 1 and expose enterprise information | |
| 17 | +| `garm_enterprise_pool_manager_status` | Gauge | `id`=<enterprise id> <br>`name`=<enterprise name> <br>`running`=<true\|false> | This is a gauge that is set to 1 if the enterprise pool manager is running and set to 0 if not | |
| 18 | + |
| 19 | +## Organization metrics |
| 20 | + |
| 21 | +| Metric name | Type | Labels | Description | |
| 22 | +|-----------------------------------------|-------|-----------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------| |
| 23 | +| `garm_organization_info` | Gauge | `id`=<organization id> <br>`name`=<organization name> | This is a gauge that is set to 1 and expose organization information | |
| 24 | +| `garm_organization_pool_manager_status` | Gauge | `id`=<organization id> <br>`name`=<organization name> <br>`running`=<true\|false> | This is a gauge that is set to 1 if the organization pool manager is running and set to 0 if not | |
| 25 | + |
| 26 | +## Repository metrics |
| 27 | + |
| 28 | +| Metric name | Type | Labels | Description | |
| 29 | +|---------------------------------------|-------|-------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------| |
| 30 | +| `garm_repository_info` | Gauge | `id`=<repository id> <br>`name`=<repository name> | This is a gauge that is set to 1 and expose repository information | |
| 31 | +| `garm_repository_pool_manager_status` | Gauge | `id`=<repository id> <br>`name`=<repository name> <br>`running`=<true\|false> | This is a gauge that is set to 1 if the repository pool manager is running and set to 0 if not | |
| 32 | + |
| 33 | +## Provider metrics |
| 34 | + |
| 35 | +| Metric name | Type | Labels | Description | |
| 36 | +|----------------------|-------|-------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------| |
| 37 | +| `garm_provider_info` | Gauge | `description`=<provider description> <br>`name`=<provider name> <br>`type`=<internal\|external> | This is a gauge that is set to 1 and expose provider information | |
| 38 | + |
| 39 | +## Pool metrics |
| 40 | + |
| 41 | +| Metric name | Type | Labels | Description | |
| 42 | +|-------------------------------|-------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------| |
| 43 | +| `garm_pool_info` | Gauge | `flavor`=<flavor> <br>`id`=<pool id> <br>`image`=<image name> <br>`os_arch`=<defined OS arch> <br>`os_type`=<defined OS name> <br>`pool_owner`=<owner name> <br>`pool_type`=<repository\|organization\|enterprise> <br>`prefix`=<prefix> <br>`provider`=<provider name> <br>`tags`=<concatenated list of pool tags> <br> | This is a gauge that is set to 1 and expose pool information | |
| 44 | +| `garm_pool_status` | Gauge | `enabled`=<true\|false> <br>`id`=<pool id> | This is a gauge that is set to 1 if the pool is enabled and set to 0 if not | |
| 45 | +| `garm_pool_bootstrap_timeout` | Gauge | `id`=<pool id> | This is a gauge that is set to the pool bootstrap timeout | |
| 46 | +| `garm_pool_max_runners` | Gauge | `id`=<pool id> | This is a gauge that is set to the pool max runners | |
| 47 | +| `garm_pool_min_idle_runners` | Gauge | `id`=<pool id> | This is a gauge that is set to the pool min idle runners | |
| 48 | + |
| 49 | +## Runner metrics |
| 50 | + |
| 51 | +| Metric name | Type | Labels | Description | |
| 52 | +|----------------------|-------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------| |
| 53 | +| `garm_runner_status` | Gauge | `controller_id`=<controller id> <br>`hostname`=<hostname> <br>`name`=<runner name> <br>`pool_owner`=<owner name> <br>`pool_type`=<repository\|organization\|enterprise> <br>`provider`=<provider name> <br>`runner_status`=<running\|stopped\|error\|pending_delete\|deleting\|pending_create\|creating\|unknown> <br>`status`=<idle\|pending\|terminated\|installing\|failed\|active> <br> | This is a gauge value that gives us details about the runners garm spawns | |
10 | 54 |
|
11 | 55 | More metrics will be added in the future. |
12 | 56 |
|
|
0 commit comments