HAProxy

HAProxy

Agent Check Agentチェック

Supported OS Linux Mac OS Windows

HAProxy 付属のダッシュボード

概要

Datadog で HAProxy のアクティビティをキャプチャして、以下のことができます。

  • HAProxy の負荷分散パフォーマンスを視覚化できます。
  • サーバーがダウンしたときに気付くことができます。
  • HAProxy のパフォーマンスを他のアプリケーションと関連付けることができます。

セットアップ

インストール

Haproxy チェックは Datadog Agent パッケージに含まれています。Haproxy サーバーには何もインストールする必要がありません。

HAProxy の準備

Prometheus の使用

このインテグレーションを設定するための推奨される方法は、HAProxy で Prometheus エンドポイントを有効にすることです。このエンドポイントは、バージョン 2 (エンタープライズバージョン 1.9rc1) 以降の HAProxy に組み込まれています。古いバージョンを使用している場合は、HAProxy Prometheus エクスポーターを設定するか、次のセクションで説明するレガシーソケットベースのインテグレーションを設定することを検討してください。

  1. 公式ガイドを使用して haproxy.conf を構成します。

  2. haproxy.d/conf.yaml で設定 use_prometheus有効にします。

  3. HAProxy を再起動して、Prometheus エンドポイントを有効にします

  4. Agent を再起動します

統計エンドポイントの使用

: このコンフィギュレーション戦略は、レガシーユーザー向けのリファレンスとして提供されています。初めてインテグレーションを設定する場合は、前のセクションで説明した Prometheus ベースの戦略の使用を検討してください。

Agent は、メトリクスを統計エンドポイント経由で収集します。

  1. haproxy.conf で統計エンドポイントを構成します。

      listen stats # Define a listen section called "stats"
      bind :9000 # Listen on localhost:9000
      mode http
      stats enable  # Enable stats page
      stats hide-version  # Hide HAProxy version
      stats realm Haproxy\ Statistics  # Title text for popup window
      stats uri /haproxy_stats  # Stats URI
      stats auth Username:Password  # Authentication credentials
    
  2. HAProxy を再起動して、統計エンドポイントを有効にします

コンフィギュレーション

ホスト

ホストで実行中の Agent に対してこのチェックを構成するには:

Agent のコンフィギュレーションディレクトリのルートにある conf.d/ フォルダーの haproxy.d/conf.yaml ファイルを編集し、HAProxy のメトリクスログの収集を開始します。使用可能なすべてのコンフィギュレーションオプションについては、haproxy.d/conf.yaml のサンプルを参照してください。

メトリクスの収集
  1. Haproxy のメトリクスの収集を開始するには、haproxy.d/conf.yaml ファイルに次の構成ブロックを追加します。

    init_config:
    
    instances:
      ## @param url - string - required
      ## Haproxy URL to connect to gather metrics.
      ## Set the according <USERNAME> and <PASSWORD> or use directly a unix stats
      ## or admin socket: unix:///var/run/haproxy.sock
      #
      - url: http://localhost/admin?stats
    
  2. Agent を再起動します

ログの収集

デフォルトで、Haproxy はログを UDP 経由で 514 ポートに送信します。Agent はこのポートでログをリッスンできますが、1024 よりも下のポート番号にバインディングするため、管理者特権が必要になります。以下ではこの設定方法について説明します。別のポートを使用することも可能で、その場合は手順 3 をスキップしてください。

  1. Datadog Agent で、ログの収集はデフォルトで無効になっています。以下のように、datadog.yaml ファイルでこれを有効にします。

    logs_enabled: true
    
  2. Haproxy のログの収集を開始するには、次の構成ブロックを haproxy.d/conf.yaml ファイルに追加します。

    logs:
      - type: udp
        port: 514
        service: <SERVICE_NAME>
        source: haproxy
    

    環境に合わせて、service パラメーターの値を変更して構成してください。使用可能なすべてのコンフィギュレーションオプションの詳細については、サンプル haproxy.d/conf.yaml を参照してください。

  3. setcap コマンドを使用して、514 ポートへのアクセスを許可します。

    sudo setcap CAP_NET_BIND_SERVICE=+ep /opt/datadog-agent/bin/agent/agent
    

    セットアップが正しいか確認するために、getcap コマンドを実行します。

    sudo getcap /opt/datadog-agent/bin/agent/agent
    

    正しければ、次のように出力されます。

    /opt/datadog-agent/bin/agent/agent = cap_net_bind_service+ep
    

    注: この setcap コマンドを、Agent をアップグレードするたびに実行してください。

  4. Agent を再起動します

Docker

コンテナで実行中の Agent に対してこのチェックを構成するには:

メトリクスの収集

アプリケーションのコンテナで、オートディスカバリーのインテグレーションテンプレートを Docker ラベルとして設定します。

LABEL "com.datadoghq.ad.check_names"='["haproxy"]'
LABEL "com.datadoghq.ad.init_configs"='[{}]'
LABEL "com.datadoghq.ad.instances"='[{"url": "https://%%host%%/admin?stats"}]'
ログの収集

ログの収集は、Datadog Agent ではデフォルトで無効になっています。有効にするには、Docker ログ収集ドキュメントを参照してください。

次に、ログインテグレーションを Docker ラベルとして設定します。

LABEL "com.datadoghq.ad.logs"='[{"source":"haproxy","service":"<SERVICE_NAME>"}]'

Kubernetes

このチェックを、Kubernetes で実行している Agent に構成します。

メトリクスの収集

アプリケーションのコンテナで、オートディスカバリーのインテグレーションテンプレートをポッドアノテーションとして設定します。他にも、ファイル、ConfigMap、または key-value ストアを使用してテンプレートを構成できます。

apiVersion: v1
kind: Pod
metadata:
  name: haproxy
  annotations:
    ad.datadoghq.com/haproxy.check_names: '["haproxy"]'
    ad.datadoghq.com/haproxy.init_configs: '[{}]'
    ad.datadoghq.com/haproxy.instances: |
      [
        {
          "url": "https://%%host%%/admin?stats"
        }
      ]      
spec:
  containers:
    - name: haproxy
ログの収集

Agent バージョン 6.0 以降で利用可能

Datadog Agent で、ログの収集はデフォルトで無効になっています。有効にする方法については、Kubernetes ログ収集のドキュメントを参照してください。

次に、ログのインテグレーションをポッドアノテーションとして設定します。これは、ファイル、ConfigMap、または key-value ストアを使用して構成することも可能です。

apiVersion: v1
kind: Pod
metadata:
  name: haproxy
  annotations:
    ad.datadoghq.com/haproxy.logs: '[{"source":"haproxy","service":"<SERVICE_NAME>"}]'
spec:
  containers:
    - name: haproxy

ECS

このチェックを、ECS で実行している Agent に構成するには:

メトリクスの収集

アプリケーションのコンテナで、オートディスカバリーのインテグレーションテンプレートを Docker ラベルとして設定します。

{
  "containerDefinitions": [{
    "name": "haproxy",
    "image": "haproxy:latest",
    "dockerLabels": {
      "com.datadoghq.ad.check_names": "[\"haproxy\"]",
      "com.datadoghq.ad.init_configs": "[{}]",
      "com.datadoghq.ad.instances": "[{\"url\": \"https://%%host%%/admin?stats\"}]"
    }
  }]
}
ログの収集

Agent バージョン 6.0 以降で利用可能

ログの収集は、Datadog Agent ではデフォルトで無効になっています。有効にするには、ECS ログ収集ドキュメントを参照してください。

次に、ログインテグレーションを Docker ラベルとして設定します。

{
  "containerDefinitions": [{
    "name": "haproxy",
    "image": "haproxy:latest",
    "dockerLabels": {
      "com.datadoghq.ad.logs": "[{\"source\":\"haproxy\",\"service\":\"<SERVICE_NAME>\"}]"
    }
  }]
}

検証

Agent の status サブコマンドを実行し、Checks セクションで haproxy を探します。

収集データ

メトリクス

haproxy.backend.active.servers
(gauge)
Current number of active servers.
haproxy.backend.agg.server.check.status
(gauge)
Backend's aggregated gauge of servers' state check status (since >= 2.4).
haproxy.backend.backup.servers
(gauge)
Current number of backup servers.
haproxy.backend.bytes.in.total
(count)
Current total of incoming bytes. By default submitted as count if using prometheus
Shown as byte
haproxy.backend.bytes.out.total
(count)
Current total of outgoing bytes. By default submitted as count if using prometheus
Shown as byte
haproxy.backend.check.last.change.seconds
(gauge)
Number of seconds since the last UP<->DOWN transition.
haproxy.backend.check.up.down.total
(count)
Total number of UP->DOWN transitions.
haproxy.backend.client.aborts.total
(count)
Total number of data transfers aborted by the client.
haproxy.backend.connect.time.average.seconds
(gauge)
Avg. connect time for last 1024 successful connections.
haproxy.backend.connection.attempts.total
(count)
Total number of connection establishment attempts.
haproxy.backend.connection.errors.total
(count)
Total number of connection errors.
haproxy.backend.connection.reuses.total
(count)
Total number of connection reuses.
haproxy.backend.current.queue
(gauge)
Current number of queued requests.
haproxy.backend.current.sessions
(gauge)
Current number of active sessions.
haproxy.backend.downtime.seconds.total
(count)
Total downtime (in seconds) for the service.
haproxy.backend.failed.header.rewriting.total
(count)
Total number of failed header rewriting warnings.
haproxy.backend.http.cache.hits.total
(count)
Total number of HTTP cache hits.
haproxy.backend.http.cache.lookups.total
(count)
Total number of HTTP cache lookups.
haproxy.backend.http.comp.bytes.bypassed.total
(count)
Total number of bytes that bypassed the HTTP compressor (CPU/BW limit).
Shown as byte
haproxy.backend.http.comp.bytes.in.total
(count)
Total number of HTTP response bytes fed to the compressor.
Shown as byte
haproxy.backend.http.comp.bytes.out.total
(count)
Total number of HTTP response bytes emitted by the compressor.
Shown as byte
haproxy.backend.http.comp.responses.total
(count)
Total number of HTTP responses that were compressed.
haproxy.backend.http.requests.total
(count)
Total number of HTTP requests received.
haproxy.backend.http.responses.total
(count)
Total number of HTTP responses.
haproxy.backend.internal.errors.total
(count)
Total number of internal errors since process started (since >= 2.2).
haproxy.backend.last.session.seconds
(gauge)
Number of seconds since last session assigned to server/backend.
haproxy.backend.limit.sessions
(gauge)
Configured session limit.
haproxy.backend.loadbalanced.total
(count)
Total number of times a service was selected, either for new sessions, or when redispatching.
haproxy.backend.max.connect.time.seconds
(gauge)
Maximum observed time spent waiting for a connection to complete
haproxy.backend.max.queue
(gauge)
Maximum observed number of queued requests.
haproxy.backend.max.queue.time.seconds
(gauge)
Maximum observed time spent in the queue
haproxy.backend.max.response.time.seconds
(gauge)
Maximum observed time spent waiting for a server response
haproxy.backend.max.session.rate
(gauge)
Maximum observed number of sessions per second.
haproxy.backend.max.sessions
(gauge)
Maximum observed number of active sessions.
haproxy.backend.max.total.time.seconds
(gauge)
Maximum observed total request+response time (request+queue+connect+response+processing)
haproxy.backend.queue.time.average.seconds
(gauge)
Avg. queue time for last 1024 successful connections.
haproxy.backend.redispatch.warnings.total
(count)
Total number of redispatch warnings.
haproxy.backend.requests.denied.total
(count)
Total number of denied requests.
haproxy.backend.response.errors.total
(count)
Total number of response errors.
haproxy.backend.response.time.average.seconds
(gauge)
Avg. response time for last 1024 successful connections.
haproxy.backend.responses.denied.total
(count)
Total number of denied responses.
haproxy.backend.retry.warnings.total
(count)
Total number of retry warnings.
haproxy.backend.server.aborts.total
(count)
Total number of data transfers aborted by the server.
haproxy.backend.sessions.total
(count)
Total number of sessions.
haproxy.backend.status
(gauge)
Current status of the service. <= 2.3: gauge value determines state (frontend: 0=STOP, 1=UP, 2=FULL - backend: 0=DOWN, 1=UP - server: 0=DOWN, 1=UP, 2=MAINT, 3=DRAIN, 4=NOLB). >= 2.4 per state label value.
haproxy.backend.total.time.average.seconds
(gauge)
Avg. total time for last 1024 successful connections.
haproxy.backend.uweight
(gauge)
Server's user weight or sum of active servers' user weights for a backend (>= 2.4).
haproxy.backend.weight
(gauge)
Service weight.
haproxy.backend_hosts
(gauge)
Number of backend hosts (legacy check only).
Shown as host
haproxy.backend.bytes.in_rate
(gauge)
Rate of bytes in on backend hosts (legacy check only).
Shown as byte
haproxy.backend.bytes.out_rate
(gauge)
Rate of bytes out on backend hosts (legacy check only).
Shown as byte
haproxy.backend.connect.time
(gauge)
Average connect time over the last 1024 backend requests (legacy check only).
Shown as millisecond
haproxy.backend.denied.req_rate
(gauge)
Number of backend requests denied due to security concerns (legacy check only).
Shown as request
haproxy.backend.denied.resp_rate
(gauge)
Number of backend responses denied due to security concerns (legacy check only).
Shown as response
haproxy.backend.errors.con_rate
(gauge)
Rate of backend requests that encountered an error trying to connect to a backend server (legacy check only).
Shown as error
haproxy.backend.errors.resp_rate
(gauge)
Rate of backend responses aborted due to error (legacy check only).
Shown as error
haproxy.backend.queue.current
(gauge)
Number of backend requests without an assigned backend (legacy check only).
Shown as request
haproxy.backend.queue.time
(gauge)
Average queue time over the last 1024 backend requests (legacy check only).
Shown as millisecond
haproxy.backend.response.1xx
(gauge)
Backend HTTP responses with 1xx code (legacy check only).
Shown as response
haproxy.backend.response.2xx
(gauge)
Backend HTTP responses with 2xx code (legacy check only).
Shown as response
haproxy.backend.response.3xx
(gauge)
Backend HTTP responses with 3xx code (legacy check only).
Shown as response
haproxy.backend.response.4xx
(gauge)
Backend HTTP responses with 4xx code (legacy check only).
Shown as response
haproxy.backend.response.5xx
(gauge)
Backend HTTP responses with 5xx code (legacy check only).
Shown as response
haproxy.backend.response.other
(gauge)
Backend HTTP responses with other code (protocol error, legacy check only).
Shown as response
haproxy.backend.response.time
(gauge)
Average response time over the last 1024 backend requests (0 for TCP, legacy check only).
Shown as millisecond
haproxy.backend.requests.tot_rate
(gauge)
Rate of total number of backend HTTP requests (legacy check only).
Shown as request
haproxy.backend.session.current
(gauge)
Number of active backend sessions (legacy check only).
Shown as connection
haproxy.backend.session.limit
(gauge)
Configured backend session limit (legacy check only).
Shown as connection
haproxy.backend.session.pct
(gauge)
Percentage of sessions in use (backend.session.current/backend.session.limit * 100, legacy check only).
Shown as percent
haproxy.backend.session.rate
(gauge)
Number of backend sessions created per second (legacy check only).
Shown as connection
haproxy.backend.session.time
(gauge)
Average total session time over the last 1024 requests (legacy check only).
Shown as millisecond
haproxy.backend.uptime
(gauge)
Number of seconds since the last UP<->DOWN transition (legacy check only)
Shown as second
haproxy.backend.warnings.redis_rate
(gauge)
Number of times a request was redispatched to another server (legacy check only).
Shown as error
haproxy.backend.warnings.retr_rate
(gauge)
Number of times a connection to a server was retried (legacy check only).
Shown as error
haproxy.count_per_status
(gauge)
Number of hosts by status (UP/DOWN/NOLB/MAINT) (legacy check only).
Shown as host
haproxy.frontend.bytes.in.total
(count)
Current total of incoming bytes. By default submitted as count if using prometheus
Shown as byte
haproxy.frontend.bytes.out.total
(count)
Current total of outgoing bytes. By default submitted as count if using prometheus
Shown as byte
haproxy.frontend.connections.rate.max
(gauge)
Maximum observed number of connections per second.
haproxy.frontend.connections.total
(count)
Total number of connections.
haproxy.frontend.current.sessions
(gauge)
Current number of active sessions.
haproxy.frontend.denied.connections.total
(count)
Total number of requests denied by 'tcp-request connection' rules.
haproxy.frontend.denied.sessions.total
(count)
Total number of requests denied by 'tcp-request session' rules.
haproxy.frontend.failed.header.rewriting.total
(count)
Total number of failed header rewriting warnings.
haproxy.frontend.http.cache.hits.total
(count)
Total number of HTTP cache hits.
haproxy.frontend.http.cache.lookups.total
(count)
Total number of HTTP cache lookups.
haproxy.frontend.http.comp.bytes.bypassed.total
(count)
Total number of bytes that bypassed the HTTP compressor (CPU/BW limit).
Shown as byte
haproxy.frontend.http.comp.bytes.in.total
(count)
Total number of HTTP response bytes fed to the compressor.
Shown as byte
haproxy.frontend.http.comp.bytes.out.total
(count)
Total number of HTTP response bytes emitted by the compressor.
Shown as byte
haproxy.frontend.http.comp.responses.total
(count)
Total number of HTTP responses that were compressed.
haproxy.frontend.http.requests.rate.max
(gauge)
Maximum observed number of HTTP requests per second.
haproxy.frontend.http.requests.total
(count)
Total number of HTTP requests received.
haproxy.frontend.http.responses.total
(count)
Total number of HTTP responses.
haproxy.frontend.intercepted.requests.total
(count)
Total number of intercepted HTTP requests.
haproxy.frontend.internal.errors.total
(count)
Total number of internal errors since process started (since >= 2.2).
haproxy.frontend.limit.session.rate
(gauge)
Configured limit on new sessions per second.
haproxy.frontend.limit.sessions
(gauge)
Configured session limit.
haproxy.frontend.max.session.rate
(gauge)
Maximum observed number of sessions per second.
haproxy.frontend.max.sessions
(gauge)
Maximum observed number of active sessions.
haproxy.frontend.request.errors.total
(count)
Total number of request errors.
haproxy.frontend.requests.denied.total
(count)
Total number of denied requests.
haproxy.frontend.responses.denied.total
(count)
Total number of denied responses.
haproxy.frontend.sessions.total
(count)
Total number of sessions.
haproxy.frontend.status
(gauge)
Current status of the service. <= 2.3: gauge value determines state (frontend: 0=STOP, 1=UP, 2=FULL - backend: 0=DOWN, 1=UP - server: 0=DOWN, 1=UP, 2=MAINT, 3=DRAIN, 4=NOLB). >= 2.4 per state label value.
haproxy.frontend.bytes.in_rate
(gauge)
Rate of bytes in on frontend hosts (legacy check only).
Shown as byte
haproxy.frontend.bytes.out_rate
(gauge)
Rate of bytes out on frontend hosts (legacy check only).
Shown as byte
haproxy.frontend.connections.rate
(gauge)
Number of connections per second (legacy check only).
Shown as connection
haproxy.frontend.connections.tot_rate
(gauge)
Rate of total number of frontend connections (legacy check only).
Shown as connection
haproxy.frontend.denied.req_rate
(gauge)
Number of frontend requests denied due to security concerns (legacy check only).
Shown as request
haproxy.frontend.denied.resp_rate
(gauge)
Number of frontend responses denied due to security concerns (legacy check only).
Shown as response
haproxy.frontend.errors.req_rate
(gauge)
Rate of frontend request errors (legacy check only).
Shown as error
haproxy.frontend.requests.intercepted
(gauge)
Number of intercepted frontend requests per second (legacy check only).
Shown as request
haproxy.frontend.requests.rate
(gauge)
Number of frontend HTTP requests per second (legacy check only).
Shown as request
haproxy.frontend.requests.tot_rate
(gauge)
Rate of total number of frontend HTTP requests (legacy check only).
Shown as request
haproxy.frontend.response.1xx
(gauge)
Frontend HTTP responses with 1xx code (legacy check only).
Shown as response
haproxy.frontend.response.2xx
(gauge)
Frontend HTTP responses with 2xx code (legacy check only).
Shown as response
haproxy.frontend.response.3xx
(gauge)
Frontend HTTP responses with 3xx code (legacy check only).
Shown as response
haproxy.frontend.response.4xx
(gauge)
Frontend HTTP responses with 4xx code (legacy check only).
Shown as response
haproxy.frontend.response.5xx
(gauge)
Frontend HTTP responses with 5xx code (legacy check only).
Shown as response
haproxy.frontend.response.other
(gauge)
Frontend HTTP responses with other code (protocol error) (legacy check only).
Shown as response
haproxy.frontend.session.current
(gauge)
Number of active frontend sessions (legacy check only).
Shown as connection
haproxy.frontend.session.limit
(gauge)
Configured frontend session limit (legacy check only).
Shown as connection
haproxy.frontend.session.pct
(gauge)
Percentage of sessions in use (frontend.session.current/frontend.session.limit * 100, legacy check only).
Shown as percent
haproxy.frontend.session.rate
(gauge)
Number of frontend sessions created per second (legacy check only).
Shown as connection
haproxy.listener.bytes.in.total
(count)
Total number of request bytes since process started (>= 2.4).
haproxy.listener.bytes.out.total
(count)
Total number of response bytes since process started (>= 2.4).
haproxy.listener.current.sessions
(gauge)
Number of current sessions on the frontend, backend or server (>= 2.4).
haproxy.listener.denied.connections.total
(count)
Total number of incoming connections blocked on a listener/frontend by a tcp-request connection rule since the worker process started (>= 2.4).
haproxy.listener.denied.sessions.total
(count)
Total number of incoming sessions blocked on a listener/frontend by a tcp-request connection rule since the worker process started
haproxy.listener.failed.header.rewriting.total
(count)
Total number of failed HTTP header rewrites since the worker process started (>= 2.4).
haproxy.listener.internal.errors.total
(count)
Total number of internal errors since process started (>= 2.4).
haproxy.listener.limit.sessions
(gauge)
Frontend/listener/server's maxconn, backend's fullconn (>= 2.4).
haproxy.listener.max.sessions
(gauge)
Highest value of current sessions encountered since process started (>= 2.4).
haproxy.listener.request.errors.total
(count)
Total number of invalid requests since process started (>= 2.4).
haproxy.listener.requests.denied.total
(count)
Total number of denied requests since process started (>= 2.4).
haproxy.listener.responses.denied.total
(count)
Total number of denied responses since process started (>= 2.4).
haproxy.listener.sessions.total
(count)
Total number of sessions since process started (>= 2.4).
haproxy.listener.status
(gauge)
Current status of the service, per state label value (>= 2.4).
haproxy.process.active.peers
(gauge)
Current number of active peers.
haproxy.process.build_info
(gauge)
Build info.
haproxy.process.busy.polling.enabled
(gauge)
Non zero if the busy polling is enabled.
haproxy.process.bytes.out.rate
(gauge)
Number of bytes emitted by current worker process over the last second (>= 2.3).
haproxy.process.bytes.out.total
(count)
Total number of bytes emitted by current worker process since started (>= 2.3).
haproxy.process.connected.peers
(gauge)
Current number of connected peers.
haproxy.process.connections.total
(count)
Total number of created sessions.
haproxy.process.current.backend.ssl.key.rate
(gauge)
Current backend SSL Key computation per second over last elapsed second.
haproxy.process.current.connection.rate
(gauge)
Current number of connections per second over last elapsed second.
haproxy.process.current.connections
(gauge)
Number of active sessions.
haproxy.process.current.frontend.ssl.key.rate
(gauge)
Current frontend SSL Key computation per second over last elapsed second.
haproxy.process.current.run.queue
(gauge)
Current number of tasks in the run-queue.
haproxy.process.current.session.rate
(gauge)
Current number of sessions per second over last elapsed second.
haproxy.process.current.ssl.connections
(gauge)
Number of opened SSL connections.
haproxy.process.current.ssl.rate
(gauge)
Current number of SSL sessions per second over last elapsed second.
haproxy.process.current.tasks
(gauge)
Current number of tasks.
haproxy.process.current.zlib.memory
(gauge)
Current memory used for zlib in bytes (zlib is no longer the default since >= 2.4).
haproxy.process.dropped.logs.total
(count)
Total number of dropped logs.
haproxy.process.failed.resolutions
(count)
Total number of failed DNS resolutions in current worker process since started (>= 2.3).
haproxy.process.frontend.ssl.reuse
(gauge)
SSL session reuse ratio (percent).
haproxy.process.hard.max.connections
(gauge)
Initial Maximum number of concurrent connections.
haproxy.process.http.comp.bytes.in.total
(count)
Number of bytes per second over last elapsed second, before http compression.
Shown as byte
haproxy.process.http.comp.bytes.out.total
(count)
Number of bytes per second over last elapsed second, after http compression.
Shown as byte
haproxy.process.idle.time.percent
(gauge)
Idle to total ratio over last sample (percent).
haproxy.process.jobs
(gauge)
Current number of active jobs (listeners, sessions, open devices).
haproxy.process.limit.connection.rate
(gauge)
Configured maximum number of connections per second.
haproxy.process.limit.http.comp
(gauge)
Configured maximum input compression rate in bytes.
haproxy.process.limit.session.rate
(gauge)
Configured maximum number of sessions per second.
haproxy.process.limit.ssl.rate
(gauge)
Configured maximum number of SSL sessions per second.
haproxy.process.listeners
(gauge)
Current number of active listeners.
haproxy.process.max.backend.ssl.key.rate
(gauge)
Maximum observed backend SSL Key computation per second.
haproxy.process.max.connection.rate
(gauge)
Maximum observed number of connections per second.
haproxy.process.max.connections
(gauge)
Maximum number of concurrent connections.
haproxy.process.max.fds
(gauge)
Maximum number of open file descriptors; 0=unset.
haproxy.process.max.frontend.ssl.key.rate
(gauge)
Maximum observed frontend SSL Key computation per second.
haproxy.process.max.memory.bytes
(gauge)
Per-process memory limit (in bytes); 0=unset.
haproxy.process.max.pipes
(gauge)
Configured maximum number of pipes.
haproxy.process.max.session.rate
(gauge)
Maximum observed number of sessions per second.
haproxy.process.max.sockets
(gauge)
Maximum number of open sockets.
haproxy.process.max.ssl.connections
(gauge)
Configured maximum number of concurrent SSL connections.
haproxy.process.max.ssl.rate
(gauge)
Maximum observed number of SSL sessions per second.
haproxy.process.max.zlib.memory
(gauge)
Configured maximum amount of memory for zlib in bytes (zlib is no longer the default since >= 2.4).
haproxy.process.nbproc
(gauge)
Configured number of processes.
haproxy.process.nbthread
(gauge)
Configured number of threads.
haproxy.process.pipes.free.total
(count)
Number of pipes unused.
haproxy.process.pipes.used.total
(count)
Number of pipes in used.
haproxy.process.pool.allocated.bytes
(gauge)
Total amount of memory allocated in pools (in bytes).
haproxy.process.pool.failures.total
(count)
Total number of failed pool allocations.
haproxy.process.pool.used.bytes
(gauge)
Total amount of memory used in pools (in bytes).
haproxy.process.recv.logs.total
(count)
Total number of log messages received by log-forwarding listeners on this worker process since started (>= 2.4).
haproxy.process.relative.process.id
(gauge)
Relative process id, starting at 1.
haproxy.process.requests.total
(count)
Total number of requests (TCP or HTTP).
haproxy.process.spliced.bytes.out.total
(count)
Total number of bytes emitted by current worker process through a kernel pipe since started (>= 2.3).
haproxy.process.ssl.cache.lookups.total
(count)
Total number of SSL session cache lookups.
haproxy.process.ssl.cache.misses.total
(count)
Total number of SSL session cache misses.
haproxy.process.ssl.connections.total
(count)
Total number of opened SSL connections.
haproxy.process.start.time.seconds
(gauge)
Start time in seconds.
haproxy.process.stopping
(gauge)
Non zero means stopping in progress.
haproxy.process.unstoppable.jobs
(gauge)
Current number of active jobs that can't be stopped during a soft stop.
haproxy.process.uptime.seconds
(gauge)
How long ago this worker process was started (>= 2.4).
haproxy.server.bytes.in.total
(count)
Current total of incoming bytes.
Shown as byte
haproxy.server.bytes.out.total
(count)
Current total of outgoing bytes.
Shown as byte
haproxy.server.check.code
(gauge)
layer5-7 code, if available of the last health check. (>= 2.0)
haproxy.server.check.duration.seconds
(gauge)
Previously run health check duration (>= 2.0)
Shown as second
haproxy.server.check.failures.total
(count)
Total number of failed check (Only counts checks failed when the server is up).
haproxy.server.check.last.change.seconds
(gauge)
Number of seconds since the last UP<->DOWN transition. (>= 2.0)
Shown as second
haproxy.server.check.status
(gauge)
Status of last health check, if enabled.. <= 2.3 HCHK_STATUS_* values in haproxy doc. >= 2.4 per state label value.
haproxy.server.check.up.down.total
(count)
Total number of UP->DOWN transitions.
haproxy.server.client.aborts.total
(count)
Total number of data transfers aborted by the client.
haproxy.server.connect.time.average.seconds
(gauge)
Avg. connect time for last 1024 successful connections.
haproxy.server.connection.attempts.total
(count)
Total number of connection establishment attempts.
haproxy.server.connection.errors.total
(count)
Total number of connection errors.
haproxy.server.connection.reuses.total
(count)
Total number of connection reuses.
haproxy.server.current.queue
(gauge)
Current number of queued requests.
haproxy.server.current.sessions
(gauge)
Current number of active sessions.
haproxy.server.current.throttle
(gauge)
Current throttle percentage for the server, when slowstart is active, or no value if not in slowstart.
haproxy.server.downtime.seconds.total
(count)
Total downtime (in seconds) for the service.
haproxy.server.failed.header.rewriting.total
(count)
Total number of failed header rewriting warnings.
haproxy.server.http.responses.total
(count)
Total number of HTTP responses.
haproxy.server.idle.connections.current
(gauge)
Current number of idle connections available for reuse.
haproxy.server.idle.connections.limit
(gauge)
Limit on the number of available idle connections.
haproxy.server.internal.errors.total
(count)
Total number of internal errors since process started (since >= 2.2).
haproxy.server.last.session.seconds
(gauge)
Number of seconds since last session assigned to server/backend.
haproxy.server.limit.sessions
(gauge)
Configured session limit.
haproxy.server.loadbalanced.total
(count)
Total number of times a service was selected, either for new sessions, or when redispatching.
haproxy.server.max.connect.time.seconds
(gauge)
Maximum observed time spent waiting for a connection to complete
haproxy.server.max.queue
(gauge)
Maximum observed number of queued requests.
haproxy.server.max.queue.time.seconds
(gauge)
Maximum observed time spent in the queue
haproxy.server.max.response.time.seconds
(gauge)
Maximum observed time spent waiting for a server response
haproxy.server.max.session.rate
(gauge)
Maximum observed number of sessions per second.
haproxy.server.max.sessions
(gauge)
Maximum observed number of active sessions.
haproxy.server.max.total.time.seconds
(gauge)
Maximum observed total request+response time (request+queue+connect+response+processing)
haproxy.server.need.connections.current
(gauge)
Estimated needed number of connections (>= 2.3).
haproxy.server.queue.limit
(gauge)
Configured maxqueue for the server (0 meaning no limit).
haproxy.server.queue.time.average.seconds
(gauge)
Avg. queue time for last 1024 successful connections.
haproxy.server.redispatch.warnings.total
(count)
Total number of redispatch warnings.
haproxy.server.response.errors.total
(count)
Total number of response errors.
haproxy.server.response.time.average.seconds
(gauge)
Avg. response time for last 1024 successful connections.
haproxy.server.responses.denied.total
(count)
Total number of denied responses.
haproxy.server.safe.idle.connections.current
(gauge)
Current number of safe idle connections (>= 2.3).
haproxy.server.retry.warnings.total
(count)
Total number of retry warnings.
haproxy.server.server.aborts.total
(count)
Total number of data transfers aborted by the server.
haproxy.server.server.idle.connections.current
(gauge)
Current number of idle connections available for reuse
haproxy.server.server.idle.connections.limit
(gauge)
Limit on the number of available idle connections
haproxy.server.sessions.total
(count)
Total number of sessions.
haproxy.server.status
(gauge)
Current status of the service. <= 2.3: gauge value determines state (frontend: 0=STOP, 1=UP, 2=FULL - backend: 0=DOWN, 1=UP - server: 0=DOWN, 1=UP, 2=MAINT, 3=DRAIN, 4=NOLB). >= 2.4 per state label value.
haproxy.server.total.time.average.seconds
(gauge)
Avg. total time for last 1024 successful connections.
haproxy.server.unsafe.idle.connections.current
(gauge)
Current number of unsafe idle connections (>= 2.3).
haproxy.server.used.connections.current
(gauge)
Current number of connections in use (>= 2.3).
haproxy.server.uweight
(gauge)
Server's user weight or sum of active servers' user weights for a backend (>= 2.4).
haproxy.server.weight
(gauge)
Service weight.
haproxy.sticktable.size
(gauge)
Maximum number of elements the table can hold (<= 2.3 through unix socket, >= 2.4 through prometheus).
haproxy.sticktable.used
(gauge)
Number of elements in the table (<= 2.3 through unix socket, >= 2.4 through prometheus).

イベント

Haproxy チェックには、イベントは含まれません。

サービスのチェック

このインテグレーションによって提供されるサービスチェックのリストについては、service_checks.json を参照してください。

トラブルシューティング

ご不明な点は、Datadog のサポートチームまでお問い合わせください。

その他の参考資料