(MAINT) Clarity refactor of Prom Stats code

Introducing the Prometheus Stats code into ABS showed that the Clarity
could be improved a bit with better variable naming, some refactoring
to reduce repitition and documenting the Metrics table itself.

Filtering these changes back to the vmpooler code base.
This commit is contained in:
John O'Connor 2020-07-30 20:25:37 +01:00
parent 2556ed6105
commit 0a6ad896f5
5 changed files with 173 additions and 56 deletions

View file

@ -240,7 +240,7 @@
#
# This section contains the connection information required to store
# historical data via statsd. This is mutually exclusive with graphite
# and takes precedence.
# and prometheus and takes precedence.
#
# Available configuration parameters:
#
@ -267,7 +267,7 @@
#
# This section contains the connection information required to store
# historical data in an external Graphite database. This is mutually exclusive
# with statsd.
# with statsd and prometheus - i.e. only one can be selected.
#
# Available configuration parameters:
#
@ -288,6 +288,34 @@
:graphite:
server: 'graphite.example.com'
# :prometheus
#
# This section contains the connection information required to store
# historical data in an external Graphite database. This is mutually exclusive
# with statsd and graphite - i.e. only one can be selected.
#
# Available configuration parameters:
#
# - prefix
# The prefix for this vmpooler instance.
# (optional; default: 'vmpooler')
#
# - prometheus_prefix
# The prefix to use while storing prometheus data.
# (optional; default: 'vmpooler')
#
# - prometheus_endpoint
# The metrics endpoint on the vmpooler server
# (optional; default: '/prometheus')
# Example:
:prometheus:
prefix: 'staging'
prometheus_prefix: 'vmpooler'
prometheus_endpoint: '/prometheus'
# :auth:
#
# This section contains information related to authenticating users