HAProxy
  • Giriş
  • Nedir?
  • Ne Değildir?
  • Nasıl Çalışır?
  • Kurulum
    • Kaynak Kod ile Derlemek
    • Sunucu için HAProxy Kurulumu
    • Paket Yöneticisi ile Kurulumu
  • Temel Yapı ve Terimler
    • Format
    • Global
    • Defaults
    • Frontend
    • Backend
    • Örnek Konfigürasyon
  • SSL Termination
    • Giriş
    • SSL Termination Faydaları
    • HAProxy ile SSL'yi etkinleştirme
    • HTTP'den HTTPS'e yönlendirme
    • SSL Sürümlerini Sınırlama
    • Sertifikaları Sınırlama
    • SNI ile Sertifika Seçimi
    • EC ve RSA Destekleme
    • İstemci Sertifikaları
  • ACL
    • Giriş
    • Format
    • Fetches
    • Converters
    • Flags
    • Matching methods
  • Maps
    • Format
    • Converters
    • Map Güncellemek
      • Dosyayı Doğrudan Düzenleme
      • lb-update Modülü Kullanarak
      • Runtime API Kullanarak
      • http-request set-map
  • Multithreading
    • Giriş
    • Multiprocess to Multithreading
    • Multithreading Desteği
    • Multithreading Yapılandırma
  • Prometheus Metrics
    • Giriş
    • Native Prometheus Desteği
    • Prometheus ile Derlemek
    • HAProxy'yi Yapılandırma
    • HAProxy Exporter
  • Stats Page
    • Giriş
  • Kaynak
Powered by GitBook
On this page

Was this helpful?

  1. Prometheus Metrics

HAProxy Exporter

PreviousHAProxy'yi YapılandırmaNextGiriş

Last updated 5 years ago

Was this helpful?

Native desteğin yerine harici olarak exporter da kullanılabilir.

release sayfasından uygun arşiv indirilerek aşağıdaki şekilde kurulabilir.

wget https://github.com/prometheus/haproxy_exporter/releases/download/v0.10.0/haproxy_exporter-0.10.0.linux-amd64.tar.gz

tar zxf haproxy_exporter-0.10.0.linux-amd64.tar.gz

chown haproxy:haproxy haproxy_exporter

mv haproxy_exporter /usr/local/bin

cat > /etc/systemd/system/haproxy_exporter.service <<EOL
[Unit]
Description=Prometheus HAProxy Exporter
After=network.target

[Service]
Type=simple
User=haproxy
Group=haproxy
ExecStart=/usr/local/bin/haproxy_exporter \
    --no-haproxy.ssl-verify \
    --web.listen-address=9101 \
    --haproxy.scrape-uri="unix:/run/haproxy/admin.sock" \
    --haproxy.timeout="5s" \
    --log.level="info"
SyslogIdentifier=haproxy_exporter
Restart=always

[Install]
WantedBy=multi-user.target
EOL

Kurulum yapıldıktan sonra test etmek için:

curl http://localhost:9101/metrics
haproxy_exporter