haproxytech / spoa-mirror

Mirror HTTP requests using the HAProxy SPOP
GNU Lesser General Public License v2.1
39 stars 16 forks source link

unknown keyword 'program' in 'defaults' section #20

Closed V3N0ME closed 3 years ago

V3N0ME commented 3 years ago

Haproxy Version

HA-Proxy version 1.8.19-1+deb10u3 2020/08/01

Config file

global
    log /dev/log    local0
    log /dev/log    local1 notice
    chroot /var/lib/haproxy
    stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners
    stats timeout 30s
    user haproxy
    group haproxy
    daemon
    master-worker

    # Default SSL material locations
    ca-base /etc/ssl/certs
    crt-base /etc/ssl/private

    # https://www.haproxy.com/blog/haproxy-1-9-2-adds-grpc-support/
    #ssl-default-bind-ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:!aNUL$
    #ssl-default-bind-options ssl-min-ver TLSv1.2

    #tune.ssl.default-dh-param 4096

defaults
    log global
    mode    http
    option  httplog
    option  dontlognull
    timeout connect 5000
    timeout client  50000
    timeout server  50000
    errorfile 400 /etc/haproxy/errors/400.http
    errorfile 403 /etc/haproxy/errors/403.http
    errorfile 408 /etc/haproxy/errors/408.http
    errorfile 500 /etc/haproxy/errors/500.http
    errorfile 502 /etc/haproxy/errors/502.http
    errorfile 503 /etc/haproxy/errors/503.http
    errorfile 504 /etc/haproxy/errors/504.http
    option http-use-htx

program mirror
    command /usr/local/bin/spoa-mirror --runtime 0 --mirror-url https://mirror-grpc-server.example.com:50053 --addres$

frontend fe_proxy
    bind :8080
    #ssl crt /etc/haproxy/combined.pem alpn h2
    filter spoe engine mirror config /etc/haproxy/mirror.conf
    default_backend be_test_api

backend be_test_api
    server test_server 172.18.0.228:4242

backend mirroragents
    mode tcp
    server mirror_agent localhost:12345
zaga00 commented 3 years ago

Hello @V3N0ME,

I think the 'program' section was added to the HAProxy configuration in version 2.0.

V3N0ME commented 3 years ago

Shoot, my bad. Thanks for the update.