SensorsIot / IOTstack

Docker stack for getting started on IOT on the Raspberry PI
GNU General Public License v3.0
1.44k stars 304 forks source link

Telegraf: report 'iotstack' as hostname to influx #573

Closed ukkopahis closed 1 year ago

ukkopahis commented 2 years ago

If no hostname is set, telegraf will generate a new random one each time it is recreated. It's more beginner and user-friendly to have a persistent non-changing hostname.

The hostname is used for tagging data sent to influxdb. If you have multiple stacks sending measurements to the same influx, this should be changed on at least one of the stacks. But that's expert usage, and not nearly as relevant as the single-stack case. Having many lots of different tagged hostnames may also reduce performance.

Note: this commit was previously part of https://github.com/SensorsIot/IOTstack/pull/554, but now split into a separate PR, as no-one shouldn't object to this being merged. (as opposed to the dependency-removal)