103 lines
2.6 KiB
YAML

global:
scrape_interval: 15s
evaluation_interval: 15s
# Attach these labels to any time series or alerts when communicating with
# external systems (federation, remote storage, Alertmanager).
external_labels:
monitor: 'docker-host-alpha'
# Load and evaluate rules in this file every 'evaluation_interval' seconds.
rule_files:
- "alert.rules"
# A scrape configuration containing exactly one endpoint to scrape.
# LOCAL SERVER
scrape_configs:
- job_name: 'nodeexporter'
scrape_interval: 5s
static_configs:
- targets: ['nodeexporter:9100']
- job_name: 'cadvisor'
scrape_interval: 5s
static_configs:
- targets: ['cadvisor:8080']
- job_name: 'prometheus'
scrape_interval: 10s
static_configs:
- targets: ['localhost:9090']
- job_name: 'pushgateway'
scrape_interval: 10s
honor_labels: true
static_configs:
- targets: ['pushgateway:9091']
# DISTANT SERVER (WITH NODE EXPORTER)
# - job_name: 'serveur-distant'
# scheme: https
# basic_auth:
# username: 'prometheus'
# password: 'htpassword-non-crypté'
# tls_config:
# ca_file: certif.crt
# insecure_skip_verify: true
# scrape_interval: 10s
# honor_labels: true
# static_configs:
# - targets: ['monitoring.mondomaine.tld:9100']
# labels:
# instance: serveur-distant
# WEBSITE MONITORING
- job_name: "website-monitoring-http"
metrics_path: /probe
params:
module: [http_2xx]
file_sd_configs:
- files:
- /etc/prometheus/targets.yml
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: blackbox-exporter:9115
- job_name: "website-monitoring-icmp"
metrics_path: /probe
params:
module: [icmp]
file_sd_configs:
- files:
- /etc/prometheus/targets.yml
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: blackbox-exporter:9115
# SI ALERT VIA ALERTMANAGER SINON COMMENTER !
alerting:
alertmanagers:
- scheme: http
static_configs:
- targets:
- 'alertmanager:9093'
# - job_name: 'nginx'
# scrape_interval: 10s
# static_configs:
# - targets: ['nginxexporter:9113']
# - job_name: 'aspnetcore'
# scrape_interval: 10s
# static_configs:
# - targets: ['eventlog-proxy:5000', 'eventlog:5000']