Configure statsd server for zap in docker

81 views
Skip to first unread message

MERIEM MELLOUS

unread,
Jun 18, 2025, 4:30:05 AMJun 18
to ZAP User Group
Hello ! 
How to configure Zap docker in order to enable statsd server ?
My configuration is the following but It is not working. When I check via the Zap API /JSON/stats/view/optionStatsdEnabled/?apikey=<<<myapikey>> I get:
{"StatsdEnabled":"false"}
dialogs.stats.statsd.enabled=true
dialogs.stats.statsd.hostname=172.17.0.1 ( local telegraf container)
dialogs.stats.statsd.port=8125
dialogs.stats.statsd.prefix=zap


Simon Bennetts

unread,
Jun 19, 2025, 11:43:39 AMJun 19
to ZAP User Group
Let me guess, you asked an LLM?
They are very bad at details I'm afraid.

You will also need to make sure ZAP can contact the statsd server from within the docker container.

Cheers,

Simon

MERIEM MELLOUS

unread,
Jun 19, 2025, 12:17:24 PMJun 19
to ZAP User Group
Hello Simon! 
I have configured a telegraf docker container to collect data from zap. When I am in GUI mode it works fine.  I get all the zap internal stats.The problem is that I don't know the exact key for statsd configuration to put in my zap config file  for my zap docker. I don't know if it is dialogs.stats.statsd.enabled=true  for example or just  statsd.enabled=true   ( to enable statsd). I am following the Zap documentation https://www.zaproxy.org/docs/desktop/ui/dialogs/options/stats/.
Can you give me the exact keys for the configuration please.
Thank you for your response !
Meriem

Simon Bennetts

unread,
Jun 20, 2025, 4:48:59 AMJun 20
to ZAP User Group
Hi Meriem,

I dont know the exact keys off hand, so thats how I would find them. You can do that yourself :)

Cheers,

Simon

MERIEM MELLOUS

unread,
Jun 20, 2025, 10:06:46 AMJun 20
to ZAP User Group
Hello Simon,
 thanks for the response.
 I got the correct keys. I ll keep the answer here in case anyone needs to configure statsd server  for a zap docker container in order to collect zap metrics. 

stats.statsd.enabled=true
stats.statsd.host=<<IP>>
stats.statsd.port=<<PORT>>
stats.statsd.prefix=<<EXTENSION>>

Cheers,
Meriem

Simon Bennetts

unread,
Jun 23, 2025, 4:26:31 AMJun 23
to ZAP User Group
Good to hear its working for you Mariem!
Reply all
Reply to author
Forward
0 new messages