Skip to main content

HAProxy operations

v0.1.7

Stats, server state, frontends/backends, session inventory, plus narrow mutators to enable/disable backend servers. Talks to the HAProxy admin socket. Set HAPROXY_SOCK env var on the runner host.

9 allowed by default 3 need approval by default
Pack ID
haproxy
Vendor
emisar
OS
linux
Actions
12
Required binaries. Install these on the host before relying on the pack — an action that calls a missing one fails at run time.
socat

Install

emisar pack install fetches this pack, re-validates it, and verifies its content hash against the --hash below — the exact bytes this page was rendered against, so a tampered copy is rejected — before copying it into the runner's packs dir. The command reloads a running daemon itself; no manual restart.

on the runner host
sudo emisar pack install haproxy --hash sha256:078e426d7ea402b0629c792dc49b88d61ad3635faa3d03b717994b2478fbc162

Actions 12 total

View on GitHub
  • haproxy.disable_server exec high

    disable server <backend>/<server>

    Stops sending new traffic to one backend server (in-flight requests continue).

    View source on GitHub
  • haproxy.enable_server exec high

    enable server <backend>/<server>

    Re-enables one backend server that was administratively disabled.

    View source on GitHub
  • haproxy.set_maxconn exec high

    set maxconn frontend <name> <N>

    Live-update the maxconn cap on one frontend without a reload.

    View source on GitHub
  • haproxy.show_backend exec low

    show backend

    List backend names.

    View source on GitHub
  • haproxy.show_errors exec low

    show errors

    List recent request/response errors captured by HAProxy. Use to debug 503s.

    View source on GitHub
  • haproxy.show_frontend exec low

    Frontend stats (show stat, type=frontend)

    Show per-frontend stats (status, sessions, bytes, denied, errors) as CSV. There is no `show frontend` Runtime-API command, so this uses `show stat -1 1 -1` — the stat dump filtered to type=frontend (the bitmask 1 = frontend).

    View source on GitHub
  • haproxy.show_info exec low

    show info

    Show HAProxy version, uptime, process stats, conn rate, mem usage.

    View source on GitHub
  • haproxy.show_map exec low

    show map

    List all loaded `map` files (the lookup tables HAProxy uses for routing).

    View source on GitHub
  • haproxy.show_pools exec low

    show pools

    Show internal memory pool usage. Use to spot leaks.

    View source on GitHub
  • haproxy.show_servers_state exec low

    show servers state

    Show persisted server state — health, weight, admin overrides. Read this before reloading config to know what state should be preserved.

    View source on GitHub
  • haproxy.show_sess exec low

    show sess

    List in-flight sessions (one row per active connection).

    View source on GitHub
  • haproxy.show_stat exec low

    show stat

    Show per-proxy + per-server stats (sessions, queues, bytes, errors, response times).

    View source on GitHub