mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-25 17:48:41 -05:00
Register circuit breaker metrics in Prometheus table
This commit is contained in:
parent
07a73d68ae
commit
a32d7c61af
2 changed files with 19 additions and 1 deletions
|
|
@ -353,6 +353,24 @@ module Vmpooler
|
|||
torun: %i[manager],
|
||||
docstring: 'vmpooler clone metrics',
|
||||
param_labels: %i[poolname]
|
||||
},
|
||||
circuit_breaker: {
|
||||
mtype: M_GAUGE,
|
||||
torun: %i[manager],
|
||||
docstring: 'Circuit breaker state and failure tracking',
|
||||
param_labels: %i[metric_path]
|
||||
},
|
||||
connection_pool: {
|
||||
mtype: M_GAUGE,
|
||||
torun: %i[manager],
|
||||
docstring: 'Connection pool health metrics',
|
||||
param_labels: %i[metric_path]
|
||||
},
|
||||
adaptive_timeout: {
|
||||
mtype: M_GAUGE,
|
||||
torun: %i[manager],
|
||||
docstring: 'Adaptive timeout statistics',
|
||||
param_labels: %i[metric_path]
|
||||
}
|
||||
}
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1300,7 +1300,7 @@ module Vmpooler
|
|||
|
||||
health = pool.health_status
|
||||
|
||||
# Push metrics
|
||||
# Push metrics using metric_path pattern
|
||||
$metrics.gauge("connection_pool.#{provider_name}.available", health[:available])
|
||||
$metrics.gauge("connection_pool.#{provider_name}.in_use", health[:in_use])
|
||||
$metrics.gauge("connection_pool.#{provider_name}.utilization", health[:utilization])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue