diff --git a/templates/410_process-ngcp.yaml.tt2 b/templates/410_process-ngcp.yaml.tt2 index 39b175f..6e21d9d 100644 --- a/templates/410_process-ngcp.yaml.tt2 +++ b/templates/410_process-ngcp.yaml.tt2 @@ -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' %] diff --git a/templates/500_init-daemons-dabian.yaml.tt2 b/templates/500_init-daemons-dabian.yaml.tt2 index 54c0cfb..0ba4a07 100644 --- a/templates/500_init-daemons-dabian.yaml.tt2 +++ b/templates/500_init-daemons-dabian.yaml.tt2 @@ -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' %]