jean-cloud-services/old_services/_monitoring/prometheus.yml
2024-01-02 17:50:14 +01:00

98 lines
3.0 KiB
YAML

# my global config
global:
scrape_interval: 60s
evaluation_interval: 60s
# scrape_timeout is set to the global default (10s).
# Attach these labels to any time series or alerts when communicating with
# external systems (federation, remote storage, Alertmanager).
external_labels:
monitor: 'codelab-monitor'
# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
# - "first.rules"
# - "second.rules"
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
- job_name: 'node-exporter'
metrics_path: /metrics
static_configs:
- targets:
- 'node-exporter:9100'
#- job_name: 'docker-exporter'
# metrics_path: /docker
# basic_auth:
# username: zqNQF2oQDB2SvmkJzgW9HRpeR8RiVeiEBFShVrPrLWZR4KzYgZjasCWXuMc
# password: jznVqvRQVDSpCK2y22ZFSegXVUoErm7typxuhpC5DYdnvZ2yEsYD6JQ5o9orCFMi6tHMg6J2kmiLzuzy95nZmLApe6zEiYnQB7sUGEWXWuk9o
# file_sd_configs:
# - files: ['/etc/prometheus/nodes.yml']
#- job_name: 'docker-official'
# metrics_path: /docker-official
# basic_auth:
# username: zqNQF2oQDB2SvmkJzgW9HRpeR8RiVeiEBFShVrPrLWZR4KzYgZjasCWXuMc
# password: jznVqvRQVDSpCK2y22ZFSegXVUoErm7typxuhpC5DYdnvZ2yEsYD6JQ5o9orCFMi6tHMg6J2kmiLzuzy95nZmLApe6zEiYnQB7sUGEWXWuk9o
# file_sd_configs:
# - files: ['/etc/prometheus/nodes.yml']
- job_name: cadvisor
scrape_interval: 30s
static_configs:
- targets:
- cadvisor:8080
- job_name: 'ping'
metrics_path: /probe
params:
module: [http_2xx]
file_sd_configs:
- files: ['/etc/prometheus/blackbox-targets.yml']
relabel_configs:
- source_labels: [__address__]
regex: (.*)(:80)?
target_label: __param_target
- source_labels: [__param_target]
regex: (.*)
target_label: instance
replacement: ${1}
- source_labels: []
regex: .*
target_label: __address__
replacement: blackbox_exporter:9115
- job_name: 'ssh_ping'
metrics_path: /probe
params:
module: [ssh_banner]
static_configs:
- targets:
- vandamme.jean-cloud.net
- tetede.jean-cloud.net
- carcasse.jean-cloud.net
- nougaro.jean-cloud.net
relabel_configs:
# Ensure port is 2222, pass as URL parameter
- source_labels: [__address__]
regex: (.*?)(:.*)?
replacement: ${1}:2222
target_label: __param_target
# Make instance label the target
- source_labels: [__param_target]
target_label: instance
# Actually talk to the blackbox exporter though
- target_label: __address__
replacement: 127.0.0.1:9115
#- job_name: 'icecast'
# static_configs:
# - targets: ['icecast_exporter:9146']