I would like to know about an issue which is appearing with multiple (10 sensors with 1-Wire) Temp (DS18B20) measurements with inputs.temp (Telegraf) and Chronograf on a RaspberryPI.
Apparently the temperature is correct gathered (10 measurements) by Telegraf but just one temperature is shown in InfluxDB. Has there to be an indexing eg temp(1), temp(i)?
How many sensors can handle Telegraf and influxdb?
How are the 10 results distinguished at the source, and at the output of telegraf? Do you only see one entry in InfluxDB when you query directly, without Chronograf?
At Telegraf the 10 results are shown, so I assume the inputs.temp works corectly … see below.
And yes in the Influxdb is only the last entry of the Telegraf output listed.
The readout takes about 10-15 seconds.
All 10 readings have identical timestamps… are they replacing previous readings instead of adding to the database store? What happens If you space them out by even 1 nsec between readings? Or include an extra tag that makes them unique, such as the DS18B20’s unique identifier.
Thank you for your suggestions! I would like to add the serial number as an extra tag, because if I add some more sensors on another GPIO it would not be problematic again. I am quite new to this field and I wonder how I can do that.
“are they replacing previous readings instead of adding to the database store?” actually, I know that the loggings are only from one sensor, the last read from the inputs.temp, because the temperature is significantly lower than the others. And this sensor shows over time the right data and is proper visualized in chronograf
Can you run the command without expanding the wildcards, and don’t complete with tab, I expect it should pick up a file for each sensor. I also notice that on some platforms it uses an alternate directory, so run both of these:
ls -l '/sys/class/hwmon/hwmon*/temp*'
ls -l '/sys/class/hwmon/hwmon*/device/temp*'
temp[1-*]_label Suggested temperature channel label.
Text string
Should only be created if the driver has hints about what
this temperature channel is being used for, and user-space
doesn't. In all other cases, the label is provided by
user-space.
RO
Because the application of a DS18B20 and other similar sensors can vary, the driver is generic and does not have any information about what the temperature channel is being used for, so this file is not created.
The device name, however, is unique among DS18B20s and could be used to add tags to the measurement (/sys/class/hwmon/hwmon*/device/name).