Configuration

global:
  scrape_interval: 15s
  scrape_timeout: 10s
  evaluation_interval: 1m
alerting:
  alertmanagers:
  - static_configs:
    - targets:
      - localhost:9093
    scheme: http
    timeout: 10s
    api_version: v1
rule_files:
- /nix/store/93bmsjxll862b1di26r9i8q0avjrndm7-rules-checkrules-checked
scrape_configs:
- job_name: node
  honor_timestamps: true
  scrape_interval: 15s
  scrape_timeout: 10s
  metrics_path: /metrics
  scheme: http
  static_configs:
  - targets:
    - ceres:9100
    - chef:9100
    - eris:9100
    - hydra:9100
    - ike:9100
    - lucifer:9100
    - mac1:9100
    - mac2:9100
    - mac3:9100
    - mac4:9100
    - mac5:9100
    - mac6:9100
    - mac7:9100
    - mac8:9100
    - mac9:9100
    - wendy:9100
    labels:
      role: unknown
  - targets:
    - chef:9100
    labels:
      role: builder
  - targets:
    - webserver:9100
    labels:
      role: webserver
  - targets:
    - bastion:9100
    labels:
      role: bastion
  - targets:
    - mac1:9101
    - mac2:9101
    - mac3:9101
    - mac4:9101
    - mac5:9101
    - mac6:9101
    - mac7:9101
    - mac8:9101
    - mac9:9101
    labels:
      mac: guest
      role: builder
  - targets:
    - mac1:9100
    - mac2:9100
    - mac3:9100
    - mac4:9100
    - mac5:9100
    - mac6:9100
    - mac7:9100
    - mac8:9100
    - mac9:9100
    labels:
      mac: host
      role: builder
- job_name: nixos
  honor_timestamps: true
  scrape_interval: 15s
  scrape_timeout: 10s
  metrics_path: /metrics
  scheme: http
  static_configs:
  - targets:
    - ceres:9300
    - chef:9300
    - eris:9300
    - hydra:9300
    - ike:9300
    - lucifer:9300
    - mac1:9300
    - mac2:9300
    - mac3:9300
    - mac4:9300
    - mac5:9300
    - mac6:9300
    - mac7:9300
    - mac8:9300
    - mac9:9300
    - wendy:9300
  - targets:
    - webserver:9300
    labels:
      role: webserver
  - targets:
    - bastion:9300
    labels:
      role: bastion
- job_name: packet_nodes
  honor_timestamps: true
  scrape_interval: 15s
  scrape_timeout: 10s
  metrics_path: /metrics
  scheme: http
  file_sd_configs:
  - files:
    - /var/lib/packet-sd/packet-sd.json
    refresh_interval: 30s
  relabel_configs:
  - source_labels: [__meta_packet_public_ipv4]
    separator: ;
    regex: (.*)
    target_label: __address__
    replacement: ${1}:9100
    action: replace
  - source_labels: [__meta_packet_facility]
    separator: ;
    regex: (.*)
    target_label: facility
    replacement: $1
    action: replace
  - source_labels: [__meta_packet_facility]
    separator: ;
    regex: (.*)
    target_label: packet_facility
    replacement: $1
    action: replace
  - source_labels: [__meta_packet_plan]
    separator: ;
    regex: (.*)
    target_label: plan
    replacement: $1
    action: replace
  - source_labels: [__meta_packet_plan]
    separator: ;
    regex: (.*)
    target_label: packet_plan
    replacement: $1
    action: replace
  - source_labels: [__meta_packet_switch_id]
    separator: ;
    regex: (.*)
    target_label: packet_switch_id
    replacement: $1
    action: replace
  - source_labels: [__meta_packet_device_id]
    separator: ;
    regex: (.*)
    target_label: packet_device_id
    replacement: $1
    action: replace
  - source_labels: [__meta_packet_state]
    separator: ;
    regex: (.*)
    target_label: packet_device_state
    replacement: $1
    action: replace
  - source_labels: [__meta_packet_short_id]
    separator: ;
    regex: (.*)
    target_label: instance
    replacement: ${1}.packethost.net
    action: replace
  - source_labels: [__meta_packet_tags]
    separator: ;
    regex: .*hydra.*
    target_label: role
    replacement: builder
    action: replace
- job_name: hydra-reexport
  honor_timestamps: true
  scrape_interval: 15s
  scrape_timeout: 10s
  metrics_path: /
  scheme: http
  static_configs:
  - targets:
    - status.nixos.org:9200
- job_name: hydra
  honor_timestamps: true
  scrape_interval: 15s
  scrape_timeout: 10s
  metrics_path: /prometheus
  scheme: https
  static_configs:
  - targets:
    - hydra.nixos.org:443
- job_name: prometheus-packet-sd
  honor_timestamps: true
  scrape_interval: 15s
  scrape_timeout: 10s
  metrics_path: /metrics
  scheme: http
  static_configs:
  - targets:
    - 127.0.0.1:9465
- job_name: prometheus-packet-spot-price-exporter
  honor_timestamps: true
  scrape_interval: 15s
  scrape_timeout: 10s
  metrics_path: /metrics
  scheme: http
  static_configs:
  - targets:
    - 127.0.0.1:9400
- job_name: prometheus-github-exporter
  honor_timestamps: true
  scrape_interval: 15s
  scrape_timeout: 10s
  metrics_path: /
  scheme: http
  static_configs:
  - targets:
    - 127.0.0.1:9401