chore: rework prometheus metrics registration
fail if metric registration panics Signed-off-by: Mario Constanti <mario.constanti@mercedes-benz.com>
This commit is contained in:
parent
3e025dda2f
commit
17d74dfbf0
11 changed files with 68 additions and 74 deletions
|
|
@ -4,10 +4,10 @@ This is one of the features in GARM that I really love having. For one thing, it
|
|||
|
||||
## Common metrics
|
||||
|
||||
| Metric name | Type | Labels | Description |
|
||||
|--------------------------|---------|-------------------------------------------------------------------|------------------------------------------------------------------------------------------------------|
|
||||
| `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. |
|
||||
| `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. |
|
||||
| Metric name | Type | Labels | Description |
|
||||
|--------------------------|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------|
|
||||
| `garm_health` | Gauge | `controller_id`=<controller id> <br>`callback_url`=<callback url> <br>`controller_webhook_url`=<controller webhook url> <br>`metadata_url`=<metadata url> <br>`webhook_url`=<webhook url> <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. |
|
||||
| `garm_webhooks_received` | Counter | `valid`=<valid request> <br>`reason`=<reason for invalid requests> | This is a counter that increments every time GARM receives a webhook from GitHub. |
|
||||
|
||||
## Enterprise metrics
|
||||
|
||||
|
|
@ -48,9 +48,9 @@ This is one of the features in GARM that I really love having. For one thing, it
|
|||
|
||||
## Runner metrics
|
||||
|
||||
| Metric name | Type | Labels | Description |
|
||||
|----------------------|-------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------|
|
||||
| `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 |
|
||||
| Metric name | Type | Labels | Description |
|
||||
|----------------------|-------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------|
|
||||
| `garm_runner_status` | Gauge | `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 |
|
||||
|
||||
More metrics will be added in the future.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue