Issue reported on
Discord led to the discovery of several problems with Telegraf:
Default configuration had been amended to:
Add support for both InfluxDB 1.8 and InfluxDB 2; and
Comment-out both InfluxDB outputs.
The practical consequences were:
The Dockerfile sed command could not find [outputs.influxdb], so the urls = ["http://influxdb:8086"] could not be inserted, so telegraf could not write to any database; and
The container went into a restart loop.
The default entrypoint.sh script had been amended to invoke telegraf via:
exec setpriv --reuid telegraf --init-groups "$@"
Inside the container, user "telegraf" is userID 999. Outside
container space, user 999 is not a member of the docker group so
it doesn't have access to /var/run/docker.sock.
The practical consequence was the telegraf process inside the
container endlessly complaining:
E! [inputs.docker] Error in plugin: permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock
Problem 1 has been addressed by removing the sed logic and adding outputs.influxdb.conf to the auto_include folder:
This defaults to the telegraf database and is sufficient for telegraf to get going.
Problem 2 has been addressed by not downgrading privileges. The alternative of changing the documentation to require the user to add userID 999 to the docker group is sub-optimal and not really in the spirit of IOTstack where, to the maximum extent possible, containers should "just work".
Also, old-menu branch had become out-of-sync with master branch. That has been rectified.
Issue reported on Discord led to the discovery of several problems with Telegraf:
Default configuration had been amended to:
The practical consequences were:
sed
command could not find[outputs.influxdb]
, so theurls = ["http://influxdb:8086"]
could not be inserted, so telegraf could not write to any database; andThe default
entrypoint.sh
script had been amended to invoke telegraf via:Inside the container, user "telegraf" is userID 999. Outside container space, user 999 is not a member of the
docker
group so it doesn't have access to/var/run/docker.sock
.The practical consequence was the telegraf process inside the container endlessly complaining:
Problem 1 has been addressed by removing the
sed
logic and addingoutputs.influxdb.conf
to theauto_include
folder:This defaults to the
telegraf
database and is sufficient for telegraf to get going.Problem 2 has been addressed by not downgrading privileges. The alternative of changing the documentation to require the user to add userID 999 to the
docker
group is sub-optimal and not really in the spirit of IOTstack where, to the maximum extent possible, containers should "just work".Also, old-menu branch had become out-of-sync with master branch. That has been rectified.