apiVersion: v1
data:
  prometheus.yaml: |
    global:
      evaluation_interval: 1m
      scrape_interval: 30s
      scrape_timeout: 5s
    rule_files: null
    scrape_configs:
    - job_name: steamer-prometheus
      scrape_interval: 15s
      kubernetes_sd_configs:
      - role: pod
        namespaces:
          names:
          - kube-system
        api_server: 'https://192.168.0.78:6443'
        authorization:
          type: Bearer
          credentials_file: /var/run/secrets/kubernetes.io/serviceaccount/token
        tls_config:
          ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
          insecure_skip_verify: false
        follow_redirects: true
      relabel_configs:
      - source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_pod_label_app]
        separator: ;
        regex: kube-system;steamer-prometheus
        replacement: $1
        action: keep
      - source_labels: [__meta_kubernetes_pod_ip]
        separator: ;
        regex: (.*)
        target_label: __address__
        replacement: $1:9090
        action: replace
    - consul_sd_configs:
      - server: prometheus-consul-server.consul:8500
        services:
        - node-exporter
      job_name: node-exporter
      metric_relabel_configs:
      - action: keep
        regex: node_boot_time_seconds$|node_cpu_seconds_total$|node_filefd_allocated$|node_filesystem_avail_bytes$|node_filesystem_avail_bytes_total$|node_filesystem_size_bytes$|node_filesystem_size_bytes_total$|node_filesystem_usage_rate_total$|node_load1$|node_load15$|node_load5$|node_memory_Buffers_bytes$|node_memory_Cached_bytes$|node_memory_MemFree_bytes$|node_memory_MemTotal_bytes$|node_netstat_Tcp_CurrEstab$|node_network_receive_bytes_per_second_total$|node_network_transmit_bytes_per_second_total$|node_sockstat_TCP_alloc$|node_sockstat_TCP_inuse$|node_sockstat_TCP_tw$|node_status_capacity_cpu_usage_rate$|node_status_capacity_memory_usage_rate$|node_disk_reads_completed_total$|node_disk_writes_completed_total$|node_disk_io_now$|node_disk_read_bytes_total$|node_disk_written_bytes_total$|node_disk_io_time_seconds_total$|node_disk_io_time_weighted_seconds_total$|node_disk_read_time_seconds_total$|node_disk_write_time_seconds_total$|node_network_receive_bytes_total$|node_network_transmit_bytes_total$
        source_labels:
        - __name__
      relabel_configs:
      - action: replace
        regex: (.+)(?::\d+)
        replacement: $1
        separator: ;
        source_labels:
        - __address__
        target_label: node_ip
kind: ConfigMap
metadata:
  name: steamer-prometheus-master-config
  namespace: kube-system
