TT#71030 Add prometheus scraper and database server selection support

Add support for selecting which prometheus scraper and database server
to use, so we are only going to be running with either prometheus or
victoria-metrics, as they will use the same port.

Change-Id: I24dad2c825cf74946ef807fcc0056880375b25ab
mr9.2
Guillem Jover 4 years ago
parent 92029bad5f
commit ca0cc5843b

@ -63,7 +63,7 @@ process:
running: [% monitoring.backend == 'influxdb' || monitoring.influxdb_migrated == 'no' ? 'true' : 'false' %]
prometheus:
running: [% monitoring.backend == 'prometheus' ? 'true' : 'false' %]
running: [% monitoring.backend == 'prometheus' && monitoring.prometheus_server == 'prometheus' ? 'true' : 'false' %]
# We have to use a truncated process name because that's the COMM limit
# on Linux (15 characters). Real name: prometheus-mysqld-exporter.
@ -128,4 +128,4 @@ process:
# We have to use a truncated process name because that's the COMM limit
# on Linux (15 characters). Real name: victoria-metrics.
victoria-metric:
running: [% monitoring.backend == 'prometheus' && is_mgmt ? 'true' : 'false' %]
running: [% monitoring.backend == 'prometheus' && monitoring.prometheus_server == 'victoria-metrics' && is_mgmt ? 'true' : 'false' %]

@ -60,8 +60,8 @@ service:
running: true
prometheus.service:
enabled: [% monitoring.backend == 'prometheus' ? 'true' : 'false' %]
running: [% monitoring.backend == 'prometheus' ? 'true' : 'false' %]
enabled: [% monitoring.backend == 'prometheus' && monitoring.prometheus_server == 'prometheus' ? 'true' : 'false' %]
running: [% monitoring.backend == 'prometheus' && monitoring.prometheus_server == 'prometheus' ? 'true' : 'false' %]
prometheus-mysqld-exporter.service:
enabled: [% monitoring.backend == 'prometheus' ? 'true' : 'false' %]
@ -96,5 +96,5 @@ service:
running: [% monitoring.backend == 'influxdb' ? 'true' : 'false' %]
victoria-metrics.service:
enabled: [% monitoring.backend == 'prometheus' && is_mgmt ? 'true' : 'false' %]
running: [% monitoring.backend == 'prometheus' && is_mgmt ? 'true' : 'false' %]
enabled: [% monitoring.backend == 'prometheus' && monitoring.prometheus_server == 'victoria-metrics' && is_mgmt ? 'true' : 'false' %]
running: [% monitoring.backend == 'prometheus' && monitoring.prometheus_server == 'victoria-metrics' && is_mgmt ? 'true' : 'false' %]

Loading…
Cancel
Save