18 # Copyright 2018 The Prometheus Authors
19 # Copyright 2018 Whitestack
20 # Copyright 2018 Telefonica Investigacion y Desarrollo, S.A.U.
22 # Licensed under the Apache License, Version 2.0 (the "License");
23 # you may not use this file except in compliance with the License.
24 # You may obtain a copy of the License at
26 # http://www.apache.org/licenses/LICENSE-2.0
28 # Unless required by applicable law or agreed to in writing, software
29 # distributed under the License is distributed on an "AS IS" BASIS,
30 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31 # See the License for the specific language governing permissions and
32 # limitations under the License.
36 scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
37 evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
38 # scrape_timeout is set to the global default (10s).
40 # Alertmanager configuration
47 # Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
50 # - "second_rules.yml"
52 # A scrape configuration containing exactly one endpoint to scrape:
53 # Here it's Prometheus itself.
55 # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
56 - job_name: 'mon_exporter'
58 # metrics_path defaults to '/metrics'
59 # scheme defaults to 'http'.
62 - targets: ['mon:8000']
75 serviceName: prometheus
85 - name: prometheus-init-config
87 command: ["/bin/sh", "-c"]
88 args: ['if [ ! -f "/etc/prometheus/prometheus.yml" ]; then cp /etc/prometheus_init/prometheus.yml /etc/prometheus; fi']
91 mountPath: /etc/prometheus
92 - name: init-prom-config
93 mountPath: /etc/prometheus_init
96 image: prom/prometheus:v2.4.3
98 - --config.file=/etc/prometheus/prometheus.yml
99 - --web.enable-lifecycle
101 - containerPort: 9090
105 mountPath: /etc/prometheus
107 mountPath: /prometheus
113 path: /var/lib/osm/prometheus
114 - name: init-prom-config