[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| [mosquitto-dev] Logging source address of failed actions | 
I was curious if there is a way to log the source IP in a CONNACK, SUBACK, or the Denied to Publish logs.  I see in the code that if the id is set (which for us it always is) that only the id will be logged and the address isn't.  I would like to have at least the source IP if not also the user/clientID to allow better formatted messages for security messages as I'm using fluent bit to convert the logs to the ECS standard.
I am currently using v2.0.18 as our mosquitto version and the majority of our connections are coming in via a secure websocket to establish the TLS layer.  For our backend ACL we're using the go-auth plugin, however that logging doesn't include the source IP either so I'm at a loss how I can potentially get the source IP and if possible also the user/clientID in the log.
Just for reference here's our current mosquitto.conf and I so far don't see any options to make sure to log the source IP via the mosquitto.conf's man page.
 log_type all
    log_type websockets
    websockets_log_level 7
    log_timestamp_format %Y-%m-%dT%H:%M:%S
    log_dest file /var/log/mosquitto.log
    connection_messages true
    listener 1883
    listener 1884
    protocol websockets
    use_username_as_clientid true
    user mosquitto
    retain_available false
    allow_anonymous false
    include_dir /etc/mosquitto/conf.d
For more information on how and why we collect your personal information, please visit our Privacy Policy.