github.com/verrazzano/verrazzano@v1.7.0/application-operator/testdata/templates/prometheus_config_job_to_be_removed.yaml (about)

     1  # Copyright (C) 2022, 2023, Oracle and/or its affiliates.
     2  # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
     3  global:
     4    scrape_interval: 20s
     5    scrape_timeout: 10s
     6    evaluation_interval: 30s
     7  alerting:
     8    alertmanagers:
     9      - follow_redirects: true
    10        scheme: http
    11        timeout: 10s
    12        api_version: v2
    13        static_configs:
    14          - targets:
    15              - prometheus-operator-kube-p-alertmanager:9093
    16  rule_files:
    17    - /etc/prometheus/rules/*.rules
    18  scrape_configs:
    19    - job_name: prometheus
    20      honor_timestamps: true
    21      scrape_interval: 20s
    22      scrape_timeout: 15s
    23      metrics_path: /metrics
    24      scheme: http
    25      follow_redirects: true
    26      static_configs:
    27        - targets:
    28            - localhost:9090
    29          labels:
    30            verrazzano_cluster: local
    31    - job_name: node-exporter
    32      honor_timestamps: true
    33      scrape_interval: 20s
    34      scrape_timeout: 15s
    35      metrics_path: /metrics
    36      scheme: http
    37      follow_redirects: true
    38      relabel_configs:
    39        - source_labels: [__meta_kubernetes_endpoints_name]
    40          separator: ;
    41          regex: node-exporter
    42          replacement: $1
    43          action: keep
    44        - separator: ;
    45          regex: (.*)
    46          target_label: verrazzano_cluster
    47          replacement: local
    48          action: replace
    49      kubernetes_sd_configs:
    50        - role: endpoints
    51          kubeconfig_file: ""
    52          follow_redirects: true
    53    - job_name: cadvisor
    54      honor_timestamps: true
    55      scrape_interval: 20s
    56      scrape_timeout: 15s
    57      metrics_path: /metrics
    58      scheme: https
    59      authorization:
    60        type: Bearer
    61        credentials_file: /var/run/secrets/kubernetes.io/serviceaccount/token
    62      tls_config:
    63        ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
    64        insecure_skip_verify: true
    65      follow_redirects: true
    66      relabel_configs:
    67        - separator: ;
    68          regex: __meta_kubernetes_node_label_(.+)
    69          replacement: $1
    70          action: labelmap
    71        - separator: ;
    72          regex: (.*)
    73          target_label: __address__
    74          replacement: kubernetes.default.svc:443
    75          action: replace
    76        - source_labels: [__meta_kubernetes_node_name]
    77          separator: ;
    78          regex: (.+)
    79          target_label: __metrics_path__
    80          replacement: /api/v1/nodes/$1/proxy/metrics/cadvisor
    81          action: replace
    82        - separator: ;
    83          regex: (.*)
    84          target_label: verrazzano_cluster
    85          replacement: local
    86          action: replace
    87      kubernetes_sd_configs:
    88        - role: node
    89          kubeconfig_file: ""
    90          follow_redirects: true
    91    - job_name: nginx-ingress-controller
    92      honor_timestamps: true
    93      scrape_interval: 20s
    94      scrape_timeout: 10s
    95      metrics_path: /metrics
    96      scheme: http
    97      follow_redirects: true
    98      relabel_configs:
    99        - source_labels: [__meta_kubernetes_pod_annotation_system_io_scrape]
   100          separator: ;
   101          regex: "true"
   102          replacement: $1
   103          action: keep
   104        - separator: ;
   105          regex: __meta_kubernetes_pod_label_(.+)
   106          replacement: $1
   107          action: labelmap
   108        - source_labels: [__meta_kubernetes_namespace]
   109          separator: ;
   110          regex: (.*)
   111          target_label: kubernetes_namespace
   112          replacement: $1
   113          action: replace
   114        - source_labels:
   115            [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
   116          separator: ;
   117          regex: ([^:]+)(?::\d+)?;(\d+)
   118          target_label: __address__
   119          replacement: $1:10254
   120          action: replace
   121        - source_labels: [__meta_kubernetes_pod_name]
   122          separator: ;
   123          regex: (.*)
   124          target_label: kubernetes_pod_name
   125          replacement: $1
   126          action: replace
   127        - separator: ;
   128          regex: (.*)
   129          target_label: verrazzano_cluster
   130          replacement: local
   131          action: replace
   132      kubernetes_sd_configs:
   133        - role: pod
   134          kubeconfig_file: ""
   135          follow_redirects: true
   136          namespaces:
   137            names:
   138              - ingress-nginx
   139    - job_name: envoy-stats
   140      honor_timestamps: true
   141      scrape_interval: 20s
   142      scrape_timeout: 10s
   143      metrics_path: /stats/prometheus
   144      scheme: http
   145      follow_redirects: true
   146      relabel_configs:
   147        - source_labels: [__meta_kubernetes_pod_container_port_name]
   148          separator: ;
   149          regex: .*-envoy-prom
   150          replacement: $1
   151          action: keep
   152        - source_labels:
   153            [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port]
   154          separator: ;
   155          regex: ([^:]+)(?::\d+)?;(\d+)
   156          target_label: __address__
   157          replacement: $1:15090
   158          action: replace
   159        - separator: ;
   160          regex: __meta_kubernetes_pod_label_(.+)
   161          replacement: $1
   162          action: labeldrop
   163        - source_labels: [__meta_kubernetes_namespace]
   164          separator: ;
   165          regex: (.*)
   166          target_label: namespace
   167          replacement: $1
   168          action: replace
   169        - source_labels: [__meta_kubernetes_pod_name]
   170          separator: ;
   171          regex: (.*)
   172          target_label: pod_name
   173          replacement: $1
   174          action: replace
   175        - separator: ;
   176          regex: (.*)
   177          target_label: verrazzano_cluster
   178          replacement: local
   179          action: replace
   180      kubernetes_sd_configs:
   181        - role: pod
   182          kubeconfig_file: ""
   183          follow_redirects: true
   184    - job_name: pilot
   185      honor_timestamps: true
   186      scrape_interval: 20s
   187      scrape_timeout: 10s
   188      metrics_path: /metrics
   189      scheme: http
   190      follow_redirects: true
   191      relabel_configs:
   192        - source_labels:
   193            [__meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name]
   194          separator: ;
   195          regex: istiod;http-monitoring
   196          replacement: $1
   197          action: keep
   198        - source_labels: [__meta_kubernetes_service_label_app]
   199          separator: ;
   200          regex: (.*)
   201          target_label: app
   202          replacement: $1
   203          action: replace
   204        - separator: ;
   205          regex: (.*)
   206          target_label: verrazzano_cluster
   207          replacement: local
   208          action: replace
   209      kubernetes_sd_configs:
   210        - role: endpoints
   211          kubeconfig_file: ""
   212          follow_redirects: true
   213          namespaces:
   214            names:
   215              - istio-system
   216    - job_name: ##JOB_NAME##
   217      honor_timestamps: true
   218      scrape_interval: 20s
   219      scrape_timeout: 10s
   220      metrics_path: /metrics
   221      scheme: https
   222      tls_config:
   223        ca_file: /etc/istio-certs/root-cert.pem
   224        cert_file: /etc/istio-certs/cert-chain.pem
   225        key_file: /etc/istio-certs/key.pem
   226        insecure_skip_verify: true
   227      follow_redirects: true
   228      relabel_configs:
   229        - separator: ;
   230          regex: (.*)
   231          target_label: verrazzano_cluster
   232          replacement: local
   233          action: replace
   234        - source_labels:
   235            [
   236              __meta_kubernetes_pod_annotation_verrazzano_io_metricsEnabled,
   237              __meta_kubernetes_pod_label_app_oam_dev_name,
   238              __meta_kubernetes_pod_label_app_oam_dev_component,
   239            ]
   240          separator: ;
   241          regex: true;hello-helidon;hello-helidon-component
   242          replacement: $1
   243          action: keep
   244        - source_labels:
   245            [__meta_kubernetes_pod_annotation_verrazzano_io_metricsPath]
   246          separator: ;
   247          regex: (.+)
   248          target_label: __metrics_path__
   249          replacement: $1
   250          action: replace
   251        - source_labels:
   252            [
   253              __address__,
   254              __meta_kubernetes_pod_annotation_verrazzano_io_metricsPort,
   255            ]
   256          separator: ;
   257          regex: ([^:]+)(?::\d+)?;(\d+)
   258          target_label: __address__
   259          replacement: $1:$2
   260          action: replace
   261        - source_labels: [__meta_kubernetes_namespace]
   262          separator: ;
   263          regex: (.*)
   264          target_label: namespace
   265          replacement: $1
   266          action: replace
   267        - separator: ;
   268          regex: __meta_kubernetes_pod_label_(.+)
   269          replacement: $1
   270          action: labelmap
   271        - source_labels: [__meta_kubernetes_pod_name]
   272          separator: ;
   273          regex: (.*)
   274          target_label: pod_name
   275          replacement: $1
   276          action: replace
   277        - separator: ;
   278          regex: (controller_revision_hash)
   279          replacement: $1
   280          action: labeldrop
   281        - source_labels: [name]
   282          separator: ;
   283          regex: .*/(.*)$
   284          target_label: webapp
   285          replacement: $1
   286          action: replace
   287      kubernetes_sd_configs:
   288        - role: pod
   289          kubeconfig_file: ""
   290          follow_redirects: true
   291          namespaces:
   292            names:
   293              - hello-helidon-05e0f7c