Log IP-Addresses of failed login attempts

Hi,

I’m trying to secure my Influxdb2 with fail2ban.
I made the container log everything in a Logfile. I get this:

ts=2021-11-22T18:12:16.341368Z lvl=error msg="api error encountered" log_id=0XzDNU80000 handler=session error="unauthorized access"
ts=2021-11-22T18:13:27.027007Z lvl=error msg="api error encountered" log_id=0XzDNU80000 handler=session error="unauthorized access"
ts=2021-11-22T18:15:37.194972Z lvl=error msg="api error encountered" log_id=0XzDNU80000 handler=session error="unauthorized access"

Is there a possibility of showing the IP-Address of the machine that tries to log in, so I can block this IP?

Thanks in advance!

Hello @cgalle,
I’m not familiar with any tool to accomplish this that’s native to InfluxDB, but I’ll ask around.

There isn’t currently a way to display IP addresses in influxd logging like that. Could you do something like put nginx as a reverse-proxy in front of influxd to do the logging and accomplish what you want? Since we don’t currently have IP address logging, that might be a way to get the behavior you are looking for.