1 #######################################################################################
2 # Copyright ETSI Contributors and Others.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 #######################################################################################
38 - record: vm_status_extended
39 expr: (last_over_time(vm_status[1m]) * on (vm_id, vim_id) group_left(ns_id, vnf_id, vdu_id, project_id, job, vdu_name, vnf_member_index) last_over_time(ns_topology[1m])) or (last_over_time(ns_topology[1m]) * -1)
43 expr: (0 * (count (vm_status_extended==0) by (ns_id, vnf_id)>=0)) or (min by (ns_id, vnf_id) (vm_status_extended))
47 expr: (0 * (count (vm_status_extended==0) by (ns_id)>=0)) or (min by (ns_id) (vm_status_extended))
51 # Copyright 2018 The Prometheus Authors
52 # Copyright 2018 Whitestack
53 # Copyright 2018 Telefonica Investigacion y Desarrollo, S.A.U.
55 # Licensed under the Apache License, Version 2.0 (the "License");
56 # you may not use this file except in compliance with the License.
57 # You may obtain a copy of the License at
59 # http://www.apache.org/licenses/LICENSE-2.0
61 # Unless required by applicable law or agreed to in writing, software
62 # distributed under the License is distributed on an "AS IS" BASIS,
63 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
64 # See the License for the specific language governing permissions and
65 # limitations under the License.
69 scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
70 evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
71 # scrape_timeout is set to the global default (10s).
73 # Alertmanager configuration
80 # Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
83 # - "second_rules.yml"
85 # A scrape configuration containing exactly one endpoint to scrape:
86 # Here it's Prometheus itself.
88 - job_name: 'mon_exporter'
90 - targets: ['mon:8000']
91 - job_name: pushgateway
96 - pushgateway-prometheus-pushgateway:9091
109 serviceName: prometheus
119 - name: prometheus-init-config
121 command: ["/bin/sh", "-c"]
122 args: ['if [ ! -f "/etc/prometheus/prometheus.yml" ]; then cp /config/prometheus.yml /etc/prometheus; fi; cp /config/osm_rules.yml /etc/prometheus']
125 mountPath: /etc/prometheus
126 - name: prom-config-base
130 image: prom/prometheus:v2.28.1
132 - --config.file=/etc/prometheus/prometheus.yml
133 - --web.enable-lifecycle
135 - containerPort: 9090
139 mountPath: /etc/prometheus
141 mountPath: /prometheus
142 - name: prometheus-config-sidecar
143 image: opensourcemano/prometheus:13
146 value: mongodb://mongodb-k8s:27017/?replicaSet=rs0
147 - name: PROMETHEUS_CONFIG_FILE
148 value: /etc/prometheus/prometheus.yml
149 - name: PROMETHEUS_BASE_CONFIG_FILE
150 value: /etc/prometheus_base/prometheus.yml
151 - name: TARGET_DATABASE
153 - name: PROMETHEUS_URL
154 value: http://prometheus:9090
157 mountPath: /etc/prometheus
158 - name: prom-config-base
159 mountPath: /etc/prometheus_base
165 - name: prom-config-base