Neko Docs

Prometheus

https://prometheus.io/

Setup

apt update -y
apt install prometheus -y

配置 Prometheus

编辑 /etc/prometheus/prometheus.yml

Exporters

BlackBox Exporter

#!/bin/bash
apt install prometheus-blackbox-exporter -y
cat > /etc/prometheus/blackbox.yml <<EOF
modules:
  tcp:
    prober: tcp
    timeout: 5s
  icmp:
    prober: icmp
  icmp_ttl5:
    prober: icmp
    timeout: 5s
  http_2xx:
    prober: http
    timeout: 30s
EOF
cat > /etc/default/prometheus-blackbox-exporter << EOF
ARGS="--config.file /etc/prometheus/blackbox.yml --web.route-prefix=<prefix>"
EOF
systemctl daemon-reload
systemctl restart prometheus-blackbox-exporter

Ping Exporter

On this page