Vérifications et politiques par défaut de HAProxy

  • Rversion finale: Xanadu
  • Mis à jour 1 août 2024
  • 1 minute de lecture
  • Agent Client Collector fournit les vérifications et politiques par défaut suivantes pour la surveillance HAProxy.

    Tableau 1. Politique des événements HAProxy
    Type Vérification Description Utilisation Sortie
    Événement check-haproxy Récupère les détails de l'équilibreur de charge HAProxy pour déterminer s'il est en cours d'exécution.
    commonchecks    check-haproxy (options)
    -h    host host
    -P    port Port on which the HAProxy server is running
    -A    all services all services
    -q    Path on which HAProxy Stats URI is configured
    -use ssl    ssl

    Exemple d'utilisation : check-haproxy.rb -h localhost -P 8080 -A true -q stats -use_ssl false

    CheckHAProxy OK: UP: 50% of 4 // services, DOWN: backend/nginx1[L4CON], backend/BACKEND
    Tableau 2. Politique de mesures HAProxy
    Type Vérification Description Utilisation Sortie
    Mesure metrics-check-haproxy Récupère les mesures de l'équilibreur de charge HAProxy pour déterminer s'il est en cours d'exécution.
    commonchecks metrics-check-haproxy (options) 
    
    -q host		Path on which HAProxy Stats URI is configured 
    
    -P port		Port on which the HAProxy server is running 
    
    -c host	       host name

    Exemple d'utilisation : metrics-check-haproxy.rb -q stats -P 8080 -c localhost

    <hostname>.haproxy.frontend.session_current 0 1652265603
    <hostname>.haproxy.frontend.session_total 0 1652265603
    <hostname>.haproxy.backend.session_current 0 1652265603 
    <hostname>.haproxy.backend.session_total 1 1652265603