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) 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: pushgateway
93 - pushgateway-prometheus-pushgateway:9091
106 serviceName: prometheus
116 - name: prometheus-init-config
118 command: ["/bin/sh", "-c"]
119 args: ['if [ ! -f "/etc/prometheus/prometheus.yml" ]; then cp /config/prometheus.yml /etc/prometheus; fi; cp /config/osm_rules.yml /etc/prometheus']
122 mountPath: /etc/prometheus
123 - name: prom-config-base
127 image: prom/prometheus:v2.28.1
129 - --config.file=/etc/prometheus/prometheus.yml
130 - --web.enable-lifecycle
132 - containerPort: 9090
136 mountPath: /etc/prometheus
138 mountPath: /prometheus
139 - name: prometheus-config-sidecar
140 image: opensourcemano/prometheus:12
143 value: mongodb://mongodb-k8s:27017/?replicaSet=rs0
144 - name: PROMETHEUS_CONFIG_FILE
145 value: /etc/prometheus/prometheus.yml
146 - name: PROMETHEUS_BASE_CONFIG_FILE
147 value: /etc/prometheus_base/prometheus.yml
148 - name: TARGET_DATABASE
150 - name: PROMETHEUS_URL
151 value: http://prometheus:9090
154 mountPath: /etc/prometheus
155 - name: prom-config-base
156 mountPath: /etc/prometheus_base
162 - name: prom-config-base