mirror of
https://github.com/Aroy-Art/Aroy-Art-Site.git
synced 2025-01-01 01:34:23 +01:00
Compare commits
No commits in common. "03d2a1cf92b1551017d48aa2f6055175f39645ea" and "7028d694c33aa9d9af9bcc1c45cb682df24d7245" have entirely different histories.
03d2a1cf92
...
7028d694c3
3 changed files with 1 additions and 62 deletions
|
@ -1,60 +0,0 @@
|
||||||
---
|
|
||||||
title: Collect Raspberry Pi CPU & GPU temp with Telegraf
|
|
||||||
date: 2022-04-06T10:05:08.281Z
|
|
||||||
lastmod: 2024-02-12T07:50:48.484Z
|
|
||||||
image: /images/blog/8RLV4tpYwkRSyWbM.webp
|
|
||||||
description: How to collect Raspberry Pi CPU and GPU temperature with Telegraf to later display it in a nice Grafana Dashboard.
|
|
||||||
tags:
|
|
||||||
- Linux
|
|
||||||
- Monitoring
|
|
||||||
draft: false
|
|
||||||
slug: collect-raspberry-pi-cpu-gpu-temp-telegraf
|
|
||||||
---
|
|
||||||
|
|
||||||
# Collect Raspberry Pi CPU & GPU temperature with Telegraf
|
|
||||||
|
|
||||||
How to collect Raspberry Pi CPU and GPU temperature with Telegraf to later display it in a nice Grafana Dashboard.
|
|
||||||
|
|
||||||
## How to use (No script required)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
#### 1. Add this to you telegraf.conf
|
|
||||||
|
|
||||||
```TOML
|
|
||||||
[[inputs.file]]
|
|
||||||
files = ["/sys/class/thermal/thermal_zone0/temp"]
|
|
||||||
name_override = "cpu_temperature"
|
|
||||||
data_format = "value"
|
|
||||||
data_type = "integer"
|
|
||||||
|
|
||||||
[[inputs.exec]]
|
|
||||||
commands = [ "/opt/vc/bin/vcgencmd measure_temp" ]
|
|
||||||
name_override = "gpu_temperature"
|
|
||||||
data_format = "grok"
|
|
||||||
grok_patterns = ["%{NUMBER:value:float}"]
|
|
||||||
```
|
|
||||||
#### **2.** Add telegraf user to video group
|
|
||||||
For telegraf to be able to get the GPU temp the telegraf user needs to be add to the video group. Do so with the command below:
|
|
||||||
```bash
|
|
||||||
sudo usermod -a -G video telegraf
|
|
||||||
```
|
|
||||||
|
|
||||||
#### **3.** Check that the telegraf config file is correct (Recommended)
|
|
||||||
Run the test with:
|
|
||||||
```bash
|
|
||||||
telegraf -config /etc/telegraf/telegraf.conf -test
|
|
||||||
```
|
|
||||||
|
|
||||||
#### **4.** Restart telegraf service
|
|
||||||
Restart telegraf to activate the new settings.
|
|
||||||
```bash
|
|
||||||
sudo systemctl restart telegraf.service
|
|
||||||
```
|
|
||||||
|
|
||||||
#### **5.** Check that everything is working
|
|
||||||
Double check that everything is working in order
|
|
||||||
```bash
|
|
||||||
sudo systemctl status telegraf.service
|
|
||||||
```
|
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
portfolio:
|
portfolio:
|
||||||
enable : true
|
enable : true
|
||||||
title : My Works
|
title : My Works
|
||||||
description : This is my portfolio, these images are made in Blender, Krita, Inkscape, Godot Engine and IRL.
|
|
||||||
image_loaded_plugin : "/plugins/image-loaded/imagesloaded.pkgd.min.js"
|
image_loaded_plugin : "/plugins/image-loaded/imagesloaded.pkgd.min.js"
|
||||||
portfolio_categories:
|
portfolio_categories:
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 2e2daa30dfe166a867de079ae75b3786513bbb83
|
Subproject commit 52e5e734a9fe7666c9a774f8153b8e596ba26580
|
Loading…
Reference in a new issue