Docker stats application not drawing graphs

Trying to get working. On the client machine(s) I confirmed the script works by manually running it and it outputs json with the docker data. Librenms discovers it as new app, says status ok, but all the graphs say Error drawing graph.

Example of one such graph’s RRD command:

RRDTool Command

rrdtool graph /tmp/EQjsqQ9LbNDGsf7E  --alt-autoscale-max --rigid -E --start 1617228900 --end 1617315581 --width 2273 --height 648 -c BACK#EEEEEE00 -c SHADEA#EEEEEE00 -c SHADEB#EEEEEE00 -c CANVAS#FFFFFF00 -c GRID#a5a5a5 -c MGRID#FF9999 -c FRAME#5e5e5e -c ARROW#5e5e5e -R normal -c FONT#000000 --font LEGEND:8:DejaVuSansMono --font AXIS:7:DejaVuSansMono --font-render-mode normal COMMENT:'PIDs (count)                       Now         Min         Max        Avg\l' COMMENT:'\l'
RRDTool Output

OK u:0.00 s:0.00 r:0.00

output of the script on one of clients:

[email protected]:~ $ /etc/snmp/

Running latest LibreNMS inside a docker. All other Applications I use work ok (fail2ban, freebsdnfsserver, ntp-server, osupdate, smart, unbound, ups-apcupsd)

Any advice welcome, thanks!

I’m guessing you have this problem;

Check what the discovery/poller says with debug enabled.

Having dealt with this before for I thought it would be that but it ain’t, however it pointed me the right way (sorta).

Executing sudo -u Debian-snmp /etc/snmp/ yields

{"version":"1","data":[],"error":"1","errorString":"Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.24/version: dial unix /var/run/docker.sock: connect: permission denied"}

Adding the script to sudoers as such Debian-snmp ALL = NOPASSWD: /etc/snmp/, /usr/bin/vcgencmd, /etc/snmp/ however does not solve it.

What solves it is running sudo chmod 662 /var/run/docker.sock which makes the docker socket writable to everyone.

This sounds like it could have security implications though, nor do I know if it will survive restart. Is there different way to achieve same result?

Did you add sudo to the extend line?

You’re right I didn’t. Restoring the docker.sock to 660, adding the script to sudoers and modifying the extend to include sudo solves it.


I’m having a similar issue where Docker Stats and Certificate apps are showing “Error Drawing Graph”. Other application graphs are working. RRDtool command shows similar as OP and missing the RRD files:

RRDTool Command

rrdtool graph /tmp/S0kW1Ye7fWc2B0ZB  -l 0 -E --start 1617813900 --end 1617900572 --width 1692 --height 517 -c BACK#EEEEEE00 -c SHADEA#EEEEEE00 -c SHADEB#EEEEEE00 -c CANVAS#FFFFFF00 -c GRID#292929 -c MGRID#2f343e -c FRAME#5e5e5e -c ARROW#5e5e5e -R normal -c FONT#7f7f7f --font LEGEND:8:DejaVuSansMono --font AXIS:7:DejaVuSansMono --font-render-mode normal COMMENT:'Age (days)                         Now         Min         Max        Avg\l' COMMENT:'\l' --daemon

RRDTool Output

OK u:0.01 s:0.01 r:0.00

I fixed the permissions issue of Debian-snmp running the script, and a debug polling run shows data is being returned correctly:

: ..
SNMP['/usr/bin/snmpget' '-v2c' '-c' 'COMMUNITY' '-Oqv' '-m' 'NET-SNMP-EXTEND-MIB' '-M' '/opt/librenms/mibs' 'udp:HOSTNAME:161' 'nsExtendOutputFull.']

RRD[last  --daemon]
RRD[update N:0:2:2084132880:2178940:0.1 --daemon]
RRD[last  --daemon]
RRD[update N:0.1:4:2084132880:54892953:2.63 --daemon]
RRD[last  --daemon]                                                                                                                                                                            RRD[update N:0.1:2:2084132880:12834570:0.62 --daemon]
RRD[last  --daemon]
RRD[update N:0.22:6:2084132880:2830106:0.14 --daemon]
RRD[last  --daemon]
RRD[update N:1.34:8:2084132880:8134852:0.39 --daemon]
RRD[last  --daemon]
RRD[update N:0.22:5:2084132880:1609564:0.08 --daemon]
SQL[UPDATE `applications` set `app_state`=?,`app_status`=?,`timestamp`=NOW() WHERE `app_id` = ? ["OK","",348] 2.39ms]

even manually querying from RRDtool returns values for those RRD files:

$ sudo -u librenms rrdtool last  --daemon

LibreNMS web and pollers are all on 21.3.0. Any suggestions for where to look next?

This is just as on the off-chance you’re running into this issue, but have you tried disabling rrdcached ?

Yes if you run rrdcached You might run into problems, currently being fixed in

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.