1 # Copyright 2021 Whitestack, LLC
2 # *************************************************************
4 # This file is part of OSM Monitoring module
5 # All Rights Reserved to Whitestack, LLC
7 # Licensed under the Apache License, Version 2.0 (the "License"); you may
8 # not use this file except in compliance with the License. You may obtain
9 # a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16 # License for the specific language governing permissions and limitations
19 # For those usages not covered by the Apache License, Version 2.0 please
20 # contact: fbravo@whitestack.com or glavado@whitestack.com
40 # Copyright 2018 The Prometheus Authors
41 # Copyright 2018 Whitestack
42 # Copyright 2018 Telefonica Investigacion y Desarrollo, S.A.U.
44 # Licensed under the Apache License, Version 2.0 (the "License");
45 # you may not use this file except in compliance with the License.
46 # You may obtain a copy of the License at
48 # http://www.apache.org/licenses/LICENSE-2.0
50 # Unless required by applicable law or agreed to in writing, software
51 # distributed under the License is distributed on an "AS IS" BASIS,
52 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
53 # See the License for the specific language governing permissions and
54 # limitations under the License.
58 scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
59 evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
60 # scrape_timeout is set to the global default (10s).
62 # Alertmanager configuration
69 # Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
72 # - "second_rules.yml"
74 # A scrape configuration containing exactly one endpoint to scrape:
75 # Here it's Prometheus itself.
77 - job_name: 'mon_exporter'
79 - targets: ['mon:8000']
80 # Add here other external targets, e.g. a pushgateway
81 # - job_name: 'pushgateway'
83 # - targets: ['prometheus-pushgateway:9091']
96 serviceName: prometheus
106 - name: prometheus-init-config
108 command: ["/bin/sh", "-c"]
109 args: ['if [ ! -f "/etc/prometheus/prometheus.yml" ]; then cp /config/prometheus.yml /etc/prometheus; fi']
112 mountPath: /etc/prometheus
113 - name: prom-config-base
117 image: prom/prometheus:v2.28.1
119 - --config.file=/etc/prometheus/prometheus.yml
120 - --web.enable-lifecycle
122 - containerPort: 9090
126 mountPath: /etc/prometheus
128 mountPath: /prometheus
129 - name: prometheus-config-sidecar
130 image: opensourcemano/prometheus:13
133 value: mongodb://mongodb-k8s:27017/?replicaSet=rs0
134 - name: PROMETHEUS_CONFIG_FILE
135 value: /etc/prometheus/prometheus.yml
136 - name: PROMETHEUS_BASE_CONFIG_FILE
137 value: /etc/prometheus_base/prometheus.yml
138 - name: TARGET_DATABASE
140 - name: PROMETHEUS_URL
141 value: http://prometheus:9090
144 mountPath: /etc/prometheus
145 - name: prom-config-base
146 mountPath: /etc/prometheus_base
152 - name: prom-config-base