HAProxy のデフォルトチェックとポリシー

  • リリースバージョン: Xanadu
  • 更新日 2024年08月01日
  • 所要時間:1分
  • エージェントクライアントコレクター は、HAProxy モニタリングのための以下のデフォルトのチェックとポリシーを提供します。

    表 : 1. HAProxy イベントポリシー
    タイプ チェック 説明 使用法 出力
    イベント check-haproxy HAProxy ロードバランサーの詳細を取得して、実行中かどうかを判断します。
    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

    使用例: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
    表 : 2. HAProxy メトリクスポリシー
    タイプ チェック 説明 使用法 出力
    メトリクス metrics-check-haproxy HAProxy ロードバランサーのメトリクスを取得して、実行中かどうかを判断します。
    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

    使用例: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