servicemonitors.yaml 15.2 KB
Newer Older
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  namespace: monitoring # namespace where prometheus is running
  name: tfs-contextservice-metric
  labels:
    app: contextservice
    #release: prometheus
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    #release: prom  # name of the release
    # ( VERY IMPORTANT: You need to know the correct release name by viewing
    #   the servicemonitor of Prometheus itself: Without the correct name,
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    #   Prometheus cannot identify the metrics of the Flask app as the target.)
spec:
  selector:
    matchLabels:
      # Target app service
      #namespace: tfs
      app: contextservice # same as above
      #release: prometheus # same as above
  endpoints:
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    - port: metrics # named port in target app
      scheme: http
      path: /metrics # path to scrape
      interval: 5s # scrape interval
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
  namespaceSelector:
    any: false
    matchNames:
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
      - tfs # namespace where the app is running
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  namespace: monitoring # namespace where prometheus is running
  name: tfs-deviceservice-metric
  labels:
    app: deviceservice
    #release: prometheus
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    #release: prom  # name of the release
    # ( VERY IMPORTANT: You need to know the correct release name by viewing
    #   the servicemonitor of Prometheus itself: Without the correct name,
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    #   Prometheus cannot identify the metrics of the Flask app as the target.)
spec:
  selector:
    matchLabels:
      # Target app service
      #namespace: tfs
      app: deviceservice # same as above
      #release: prometheus # same as above
  endpoints:
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    - port: metrics # named port in target app
      scheme: http
      path: /metrics # path to scrape
      interval: 5s # scrape interval
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
  namespaceSelector:
    any: false
    matchNames:
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
      - tfs # namespace where the app is running
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  namespace: monitoring # namespace where prometheus is running
  name: tfs-serviceservice-metric
  labels:
    app: serviceservice
    #release: prometheus
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    #release: prom  # name of the release
    # ( VERY IMPORTANT: You need to know the correct release name by viewing
    #   the servicemonitor of Prometheus itself: Without the correct name,
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    #   Prometheus cannot identify the metrics of the Flask app as the target.)
spec:
  selector:
    matchLabels:
      # Target app service
      #namespace: tfs
      app: serviceservice # same as above
      #release: prometheus # same as above
  endpoints:
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    - port: metrics # named port in target app
      scheme: http
      path: /metrics # path to scrape
      interval: 5s # scrape interval
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
  namespaceSelector:
    any: false
    matchNames:
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
      - tfs # namespace where the app is running
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  namespace: monitoring # namespace where prometheus is running
  name: tfs-sliceservice-metric
  labels:
    app: sliceservice
    #release: prometheus
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    #release: prom  # name of the release
    # ( VERY IMPORTANT: You need to know the correct release name by viewing
    #   the servicemonitor of Prometheus itself: Without the correct name,
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    #   Prometheus cannot identify the metrics of the Flask app as the target.)
spec:
  selector:
    matchLabels:
      # Target app service
      #namespace: tfs
      app: sliceservice # same as above
      #release: prometheus # same as above
  endpoints:
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    - port: metrics # named port in target app
      scheme: http
      path: /metrics # path to scrape
      interval: 5s # scrape interval
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
  namespaceSelector:
    any: false
    matchNames:
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
      - tfs # namespace where the app is running
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  namespace: monitoring # namespace where prometheus is running
  name: tfs-pathcompservice-metric
  labels:
    app: pathcompservice
    #release: prometheus
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    #release: prom  # name of the release
    # ( VERY IMPORTANT: You need to know the correct release name by viewing
    #   the servicemonitor of Prometheus itself: Without the correct name,
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    #   Prometheus cannot identify the metrics of the Flask app as the target.)
spec:
  selector:
    matchLabels:
      # Target app service
      #namespace: tfs
      app: pathcompservice # same as above
      #release: prometheus # same as above
  endpoints:
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    - port: metrics # named port in target app
      scheme: http
      path: /metrics # path to scrape
      interval: 5s # scrape interval
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
  namespaceSelector:
    any: false
    matchNames:
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
      - tfs # namespace where the app is running
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  namespace: monitoring # namespace where prometheus is running
  name: tfs-monitoringservice-metric
  labels:
    app: monitoringservice
    #release: prometheus
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    #release: prom  # name of the release
    # ( VERY IMPORTANT: You need to know the correct release name by viewing
    #   the servicemonitor of Prometheus itself: Without the correct name,
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    #   Prometheus cannot identify the metrics of the Flask app as the target.)
spec:
  selector:
    matchLabels:
      # Target app service
      #namespace: tfs
      app: monitoringservice # same as above
      #release: prometheus # same as above
  endpoints:
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    - port: metrics # named port in target app
      scheme: http
      path: /metrics # path to scrape
      interval: 5s # scrape interval
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
  namespaceSelector:
    any: false
    matchNames:
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
      - tfs # namespace where the app is running
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  namespace: monitoring # namespace where prometheus is running
  name: tfs-dltservice-metric
  labels:
    app: dltservice
    #release: prometheus
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    #release: prom  # name of the release
    # ( VERY IMPORTANT: You need to know the correct release name by viewing
    #   the servicemonitor of Prometheus itself: Without the correct name,
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    #   Prometheus cannot identify the metrics of the Flask app as the target.)
spec:
  selector:
    matchLabels:
      # Target app service
      #namespace: tfs
      app: dltservice # same as above
      #release: prometheus # same as above
  endpoints:
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    - port: metrics # named port in target app
      scheme: http
      path: /metrics # path to scrape
      interval: 5s # scrape interval
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
  namespaceSelector:
    any: false
    matchNames:
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
      - tfs # namespace where the app is running
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  namespace: monitoring # namespace where prometheus is running
  name: tfs-interdomainservice-metric
  labels:
    app: interdomainservice
    #release: prometheus
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    #release: prom  # name of the release
    # ( VERY IMPORTANT: You need to know the correct release name by viewing
    #   the servicemonitor of Prometheus itself: Without the correct name,
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    #   Prometheus cannot identify the metrics of the Flask app as the target.)
spec:
  selector:
    matchLabels:
      # Target app service
      #namespace: tfs
      app: interdomainservice # same as above
      #release: prometheus # same as above
  endpoints:
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    - port: metrics # named port in target app
      scheme: http
      path: /metrics # path to scrape
      interval: 5s # scrape interval
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
  namespaceSelector:
    any: false
    matchNames:
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
      - tfs # namespace where the app is running
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  namespace: monitoring # namespace where prometheus is running
  name: tfs-policyservice-metric
  labels:
    app: policyservice
    #release: prometheus
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    #release: prom  # name of the release
    # ( VERY IMPORTANT: You need to know the correct release name by viewing
    #   the servicemonitor of Prometheus itself: Without the correct name,
    #   Prometheus cannot identify the metrics of the Flask app as the target.)
spec:
  selector:
    matchLabels:
      # Target app service
      #namespace: tfs
      app: policyservice # same as above
      #release: prometheus # same as above
  endpoints:
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    - port: metrics # named port in target app
      scheme: http
      path: /q/metrics # path to scrape
      interval: 5s # scrape interval
  namespaceSelector:
    any: false
    matchNames:
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
      - tfs # namespace where the app is running
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  namespace: monitoring # namespace where prometheus is running
  name: tfs-ztpservice-metric
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    #release: prom  # name of the release
    # ( VERY IMPORTANT: You need to know the correct release name by viewing
    #   the servicemonitor of Prometheus itself: Without the correct name,
    #   Prometheus cannot identify the metrics of the Flask app as the target.)
spec:
  selector:
    matchLabels:
      # Target app service
      #namespace: tfs
      app: ztpservice # same as above
      #release: prometheus # same as above
  endpoints:
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    - port: metrics # named port in target app
      scheme: http
      path: /q/metrics # path to scrape
      interval: 5s # scrape interval
  namespaceSelector:
    any: false
    matchNames:
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
      - tfs # namespace where the app is running
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  namespace: monitoring # namespace where prometheus is running
  name: tfs-nbiservice-metric
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
  labels:
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    #release: prometheus
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    #release: prom  # name of the release
    # ( VERY IMPORTANT: You need to know the correct release name by viewing
    #   the servicemonitor of Prometheus itself: Without the correct name,
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    #   Prometheus cannot identify the metrics of the Flask app as the target.)
spec:
  selector:
    matchLabels:
      # Target app service
      #namespace: tfs
      app: nbiservice # same as above
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
      #release: prometheus # same as above
  endpoints:
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    - port: metrics # named port in target app
      scheme: http
      path: /metrics # path to scrape
      interval: 5s # scrape interval
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
  namespaceSelector:
    any: false
    matchNames:
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
      - tfs # namespace where the app is running
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  namespace: monitoring # namespace where prometheus is running
  name: tfs-load-generatorservice-metric
  labels:
    app: load-generatorservice
    #release: prometheus
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    #release: prom  # name of the release
    # ( VERY IMPORTANT: You need to know the correct release name by viewing
    #   the servicemonitor of Prometheus itself: Without the correct name,
    #   Prometheus cannot identify the metrics of the Flask app as the target.)
spec:
  selector:
    matchLabels:
      # Target app service
      #namespace: tfs
      app: load-generatorservice # same as above
      #release: prometheus # same as above
  endpoints:
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    - port: metrics # named port in target app
      scheme: http
      path: /metrics # path to scrape
      interval: 5s # scrape interval
  namespaceSelector:
    any: false
    matchNames:
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
      - tfs # namespace where the app is running
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  namespace: monitoring # namespace where prometheus is running
  name: tfs-dbscanservingservice-metric
  labels:
    app: dbscanservingservice
    #release: prometheus
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    #release: prom  # name of the release
    # ( VERY IMPORTANT: You need to know the correct release name by viewing
    #   the servicemonitor of Prometheus itself: Without the correct name,
    #   Prometheus cannot identify the metrics of the Flask app as the target.)
spec:
  selector:
    matchLabels:
      # Target app service
      #namespace: tfs
      app: dbscanservingservice # same as above
      #release: prometheus # same as above
  endpoints:
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    - port: metrics # named port in target app
      scheme: http
      path: /metrics # path to scrape
      interval: 5s # scrape interval
  namespaceSelector:
    any: false
    matchNames:
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
      - tfs # namespace where the app is running
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  namespace: monitoring # namespace where prometheus is running
  name: tfs-opticalattackmitigatorservice-metric
  labels:
    app: opticalattackmitigatorservice
    #release: prometheus
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    #release: prom  # name of the release
    # ( VERY IMPORTANT: You need to know the correct release name by viewing
    #   the servicemonitor of Prometheus itself: Without the correct name,
    #   Prometheus cannot identify the metrics of the Flask app as the target.)
spec:
  selector:
    matchLabels:
      # Target app service
      #namespace: tfs
      app: opticalattackmitigatorservice # same as above
      #release: prometheus # same as above
  endpoints:
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    - port: metrics # named port in target app
      scheme: http
      path: /metrics # path to scrape
      interval: 5s # scrape interval
  namespaceSelector:
    any: false
    matchNames:
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
      - tfs # namespace where the app is running
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  namespace: monitoring # namespace where prometheus is running
  name: tfs-opticalattackdetectorservice-metric
  labels:
    app: opticalattackdetectorservice
    #release: prometheus
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    #release: prom  # name of the release
    # ( VERY IMPORTANT: You need to know the correct release name by viewing
    #   the servicemonitor of Prometheus itself: Without the correct name,
    #   Prometheus cannot identify the metrics of the Flask app as the target.)
spec:
  selector:
    matchLabels:
      # Target app service
      #namespace: tfs
      app: opticalattackdetectorservice # same as above
      #release: prometheus # same as above
  endpoints:
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    - port: metrics # named port in target app
      scheme: http
      path: /metrics # path to scrape
      interval: 5s # scrape interval
  namespaceSelector:
    any: false
    matchNames:
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
      - tfs # namespace where the app is running
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  namespace: monitoring # namespace where prometheus is running
  name: tfs-opticalattackmanagerservice-metric
  labels:
    app: opticalattackmanagerservice
    #release: prometheus
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    #release: prom  # name of the release
    # ( VERY IMPORTANT: You need to know the correct release name by viewing
    #   the servicemonitor of Prometheus itself: Without the correct name,
    #   Prometheus cannot identify the metrics of the Flask app as the target.)
spec:
  selector:
    matchLabels:
      # Target app service
      #namespace: tfs
      app: opticalattackmanagerservice # same as above
      #release: prometheus # same as above
  endpoints:
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
    - port: metrics # named port in target app
      scheme: http
      path: /metrics # path to scrape
      interval: 5s # scrape interval
  namespaceSelector:
    any: false
    matchNames:
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
      - tfs # namespace where the app is running