Skip to content

Commit

Permalink
Merge pull request influxdata#229 from influxdata/timhallinflux-patch-1
Browse files Browse the repository at this point in the history
Rasp PI Template updates
  • Loading branch information
timhallinflux authored Feb 2, 2021
2 parents 9a33b39 + b628a4e commit edd5a9c
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 5 deletions.
7 changes: 3 additions & 4 deletions raspberry-pi/raspberry-pi-system.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ kind: Bucket
metadata:
name: heuristic-sinoussi-d7d017
spec:
associations:
associations:
- kind: Label
name: tender-wu-ecc001
Expand Down Expand Up @@ -223,7 +222,7 @@ spec:
from(bucket: v.bucket)
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["host"] == v.linux_host)
|> filter(fn: (r) => r["_measurement"] == "gpu_temperature")
|> filter(fn: (r) => r["_measurement"] == "temperature_gpu")
|> filter(fn: (r) => r["_field"] == "value")
|> last()
|> yield(name: "last")
Expand Down Expand Up @@ -542,8 +541,8 @@ spec:
[[inputs.system]]
[[inputs.exec]]
commands = ["/opt/vc/bin/vcgencmd measure_temp"]
name_override = "gpu_temperature"
commands = ["/usr/bin/vcgencmd measure_temp"]
name_override = "temperature_gpu"
data_format = "grok"
grok_patterns = ["%{NUMBER:value:float}"]
Expand Down
27 changes: 26 additions & 1 deletion raspberry-pi/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,32 @@ General instructions on using InfluxDB Templates can be found in the [use a temp
sudo usermod -a -G video telegraf
sudo -u telegraf vcgencmd measure_temp
```


You may need to logout/log back in for this to take effect. If running Ubuntu on Raspberry Pi 400, a reboot may be necessary.

- You may need to modify the telegraf configuration to reflect the location of your `vcgencmd`. Currently, the telegraf configuration is set for
Ubuntu (Groovy Gorilla):

```
[[inputs.exec]]
commands = ["/usr/bin/vcgencmd measure_temp"]
name_override = "temperature_gpu"
data_format = "grok"
grok_patterns = ["%{NUMBER:value:float}"]
```

You can check the location of `vcgencmd` on your Raspberry Pi using:

```sh
which vcgencmd
```

Typically on Raspberry Pi OS, the `commands` line should be :

```
commands = ["/opt/vc/bin/vcgencmd measure_temp"]
```

Telegraf configuration requires the following environment variables:

- `INFLUX_HOST` - The URL of your influxdb server.
Expand Down

0 comments on commit edd5a9c

Please sign in to comment.