apiVersion: v1
kind: ConfigMap
metadata:
  name: prometheus-config
data:
  prometheus.yml: |+
    global:
      # How frequently to scrape targets by default.
      scrape_interval: 1m

      # How long until a scrape request times out.
      scrape_timeout: 10s

      # How frequently to evaluate rules.
      evaluation_interval: 1m

      # The labels to add to any time series or alerts when communicating with
      # external systems (federation, remote storage, Alertmanager).
    #  external_labels:
    #    [ <labelname>: <labelvalue> ... ]

    # Rule files specifies a list of globs. Rules and alerts are read from
    # all matching files.
    # rule_files:
    #   - /etc/prometheus/rules/*.yml

    # A list of scrape configurations.
    scrape_configs:
      - job_name: 'prometheus'
        static_configs:
        - targets: ['localhost:9090']
      - job_name: 'linux_hosts'
        static_configs:
        - targets:
          - 'pi-1:9273'
          - 'pi-2:9273'
          - 'pi-3:9273'
    # Alerting specifies settings related to the Alertmanager.
    # alerting:
    #  alert_relabel_configs:
    #    [ - <relabel_config> ... ]
    #  alertmanagers:
    #  - static_configs:
    #    - targets:
    #       - pi-1:9093

    # Settings related to the remote write feature.
    #remote_write:
    #  [ - <remote_write> ... ]

    # Settings related to the remote read feature.
    #remote_read:
    #  [ - <remote_read> ... ]