Hello,
First of all thank you very for this awesome project! I read a lot of the documentation and issues in the last few days and it shows that there is a lot of support.
I'm trying to send custom metrics from my app and have been struggling with sending statsd metrics to netdata running in docker.
The docker command is:
sudo docker run -d --name=netdata \
-p 19999:19999 \
-p 8125:8125/udp \
-p 8125:8125/tcp \
-v /proc:/host/proc:ro \
-v /sys:/host/sys:ro \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-v /etc/netdata/netdata.conf:/etc/netdata/netdata.conf
--cap-add SYS_PTRACE \
--security-opt apparmor=unconfined \
netdata/netdata
In the netdata.conf file I set the statsd plugin according to the wiki (https://docs.netdata.cloud/collectors/statsd.plugin/#sending-statsd-metrics-from-shell-scripts):
[global]
hostname = <hostname>
history = 8640 # 24 hours - 8640 samples every 10 sec
update every = 10
memory mode = save
[plugins]
enable running new plugins = no
proc = yes
python.d = no
apps = no
[statsd]
enabled = yes
decimal detail = 1000
update every (flushInterval) = 1
udp messages to process at once = 10
create private charts for metrics matching = *
max private charts allowed = 200
max private charts hard limit = 1000
private charts memory mode = save
private charts history = 3996
histograms and timers percentile (percentThreshold) = 95.00000
add dimension for number of events received = yes
gaps on gauges (deleteGauges) = no
gaps on counters (deleteCounters) = no
gaps on meters (deleteMeters) = no
gaps on sets (deleteSets) = no
gaps on histograms (deleteHistograms) = no
gaps on timers (deleteTimers) = no
listen backlog = 4096
default port = 8125
bind to = udp:localhost:8125 tcp:localhost:8125
[plugin:proc]
netdata server resources = no
/proc/stat = yes
/proc/uptime = yes
/proc/loadavg = no
/proc/sys/kernel/random/entropy_avail = no
/proc/interrupts = no
/proc/softirqs = no
/proc/vmstat = no
/proc/meminfo = yes
/sys/kernel/mm/ksm = no
/sys/devices/system/edac/mc = no
/sys/devices/system/node = no
/proc/net/dev = yes
/proc/net/sockstat = yes
/proc/net/sockstat6 = yes
/proc/net/netstat = no
/proc/net/snmp = no
/proc/net/snmp6 = no
/proc/net/sctp/snmp = no
/proc/net/softnet_stat = no
/proc/net/ip_vs/stats = no
/proc/net/stat/conntrack = no
/proc/net/stat/synproxy = no
/proc/diskstats = no
/proc/net/rpc/nfsd = no
/proc/net/rpc/nfs = no
/proc/spl/kstat/zfs/arcstats = no
/sys/fs/btrfs = no
ipc = no
[plugin:cgroups]
enable systemd services = no
[plugin:proc:/proc/stat]
per cpu core utilization = no
cpu idle states = no
In order to send stats I use a python statsd client: statsd==3.3.0
I don't get any error in the code but when checking if stats were added under
When I tried running netdata locally without docker it worked and stats were received.
Not sure what I'm missing here, any help would be greatly appreciated
solved by changing binding config to:
[statsd]
bind to = udp:0.0.0.0:8125 tcp:0.0.0.0:8125
Most helpful comment
solved by changing binding config to:
[statsd]
bind to = udp:0.0.0.0:8125 tcp:0.0.0.0:8125