You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue reported on
[Discord](https://discord.com/channels/638610460567928832/638610461109256194/1121820918210121838)
led to the discovery of several problems with Telegraf:
1. 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.
2. 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:
```
[[outputs.influxdb]]
urls = ["http://influxdb:8086"]
```
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.
Signed-off-by: Phill Kelley <[email protected]>
0 commit comments