X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=installers%2Fdocker%2Fosm_pods%2Fprometheus.yaml;h=93cd20aea451226bcabacecb6d205fd3eb989579;hb=b3daa3a5aa897ea1f0708c520e325bfd682d2a12;hp=cdfd94d863e1d47891b44bbe0f77e65cfe38cd7d;hpb=8339ed24e9270f4cd7aa34bb632505d8d72f6c4a;p=osm%2Fdevops.git diff --git a/installers/docker/osm_pods/prometheus.yaml b/installers/docker/osm_pods/prometheus.yaml index cdfd94d8..93cd20ae 100644 --- a/installers/docker/osm_pods/prometheus.yaml +++ b/installers/docker/osm_pods/prometheus.yaml @@ -53,7 +53,7 @@ data: # Here it's Prometheus itself. scrape_configs: # The job name is added as a label `job=` to any timeseries scraped from this config. - - job_name: 'prometheus' + - job_name: 'mon_exporter' # metrics_path defaults to '/metrics' # scheme defaults to 'http'. @@ -81,21 +81,36 @@ spec: labels: app: prometheus spec: + initContainers: + - name: prometheus-init-config + image: busybox + command: ["/bin/sh", "-c"] + args: ['if [ ! -f "/etc/prometheus/prometheus.yml" ]; then cp /etc/prometheus_init/prometheus.yml /etc/prometheus; fi'] + volumeMounts: + - name: prom-config + mountPath: /etc/prometheus + - name: init-prom-config + mountPath: /etc/prometheus_init containers: - name: prometheus image: prom/prometheus:v2.4.3 + args: + - --config.file=/etc/prometheus/prometheus.yml + - --web.enable-lifecycle ports: - containerPort: 9090 protocol: TCP volumeMounts: - name: prom-config - mountPath: /etc/prometheus/ + mountPath: /etc/prometheus - name: prom-db mountPath: /prometheus volumes: - - configMap: - defaultMode: 420 - name: prom - name: prom-config - emptyDir: {} name: prom-db + - name: prom-config + hostPath: + path: /var/lib/osm/prometheus + - name: init-prom-config + configMap: + name: prom