VPS間のレスポンスデータ収集をprometheusでやってみる。blackbox-exporterというのを試してみた。
この手のを、以前は準備するのに数日かけてしまっていたのが、もはやものの数分で監視・レスポンスデータ収集開始できるようになってる。
modules:
http_2xx:
prober: http
http:
icmp:
prober: icmp
icmp:
preferred_ip_protocol: "ip4"
- job_name: 'blackbox'
metrics_path: /probe
params:
module: [icmp]
static_configs:
- targets:
- tyo.balus.xyz
- hnd.balus.xyz
- osk.balus.xyz
- lax.balus.xyz
- lon.balus.xyz
- scl.balus.xyz
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: 127.0.0.1:9115可視化フロントエンドはgrafana使う。blackbox-exporterのhttp_2xxはping超えできない場合ように残してる。blackbox-exporter pingの時はpingレスポンス受信をできるようにsysctl設定しよう、とあったが、すぐうまくいかなかったので禁じ手(?)で起動した。