I'm using HAProxy as a proxy for MQTT connections, and I'm looking to
add data from the MQTT CONNACK message (from the server) to my logs.

I have tried the following, however the result is empty ("")

    tcp-response inspect-delay 5s
    tcp-response content set-var(txn.pv)
res.payload(0,0),mqtt_field_value(connack,protocol_version)

    log-format "%{+Q}[var(txn.pv)]"

I have been able to successfully log data from the CONNECT message by
following the examples given in the documentation.

Does anyone have a solution for this?

Many thanks,


Noureddine

Reply via email to