Hi
I have problems getting graphs on Docker ressources printed.
When I click Apps -> Docker under the host I get ‘Error drawing graph’ on all graphs on that page.
As per the documentation I have installed the script which polls docker stats via snmp and added the snmp user to the docker group (and verified that it can run under that user). Host OS is Debian.
When I debug graphs I get:
‘Warning: Invalid argument supplied for foreach() in /opt/librenms/includes/html/graphs/generic_multi_line_exact_numbers.inc.php on line 28’
That makes perfect sense because when I look at the rrd directory there’s no app-docker*.rrd files.
On the host I want to poll I’ve been doing a little digging too. I tried adding the docker-stats.sh to /etc/sudoers so that the Debian-snmp user could run that (even though running the script as the Debian-snmp user worked fine) just to rule that out. I had also read that rrdcache could influence some graphs being drawn. But rrdcache is not installed (also, with no rrd files that can’t be the issue either).
The eventlog on LibreNMS has no entries for that host that can provide me with any help; neither has the daemon log on the polled server.
So I am fresh out of ideas here.
To reproduce:
- Install Debian on random box
- Install Docker
- Install LibreNMS using docker-compose (as described on https://github.com/librenms/docker/tree/master/examples/compose)
- Setup snmpd and install docker-helper script on remote Linux server with Docker (Debian as well) (as described in LibreNMS docs). Add Debian-snmp user to docker group.
I have run validate.php as requested. LibreNMS itself runs in Docker too. But I don’t see that have any impact.
/opt/librenms $ ./validate.php
====================================
Component | Version
--------- | -------
LibreNMS | 21.3.0
DB Schema | 2021_03_17_160729_service_templates_cleanup (201)
PHP | 7.4.15
Python | 3.8.8
MySQL | 10.4.18-MariaDB-1:10.4.18+maria~focal
RRDTool | 1.7.2
SNMP | NET-SNMP 5.9
====================================
[OK] Installed from the official Docker image; no Composer required
[OK] Database connection successful
[OK] Database schema correct
[WARN] IPv6 is disabled on your server, you will not be able to add IPv6 devices.
[WARN] Global lnms shortcut not installed. lnms command must be run with full path
[FIX]:
sudo ln -s /opt/librenms/lnms /usr/bin/lnms
[WARN] Log rotation not enabled, could cause disk space issues
[FIX]:
sudo cp /opt/librenms/misc/librenms.logrotate /etc/logrotate.d/librenms
[WARN] Updates are managed through the official Docker image
Thanks for any help you can provide
/klaus