{"id":13809227,"url":"https://github.com/TheMickeyMike/raspberrypi-temperature-telegraf","last_synced_at":"2025-05-14T05:33:35.599Z","repository":{"id":86667198,"uuid":"88528102","full_name":"TheMickeyMike/raspberrypi-temperature-telegraf","owner":"TheMickeyMike","description":"Collect RaspberryPi CPU and GPU temperature with telegraf","archived":false,"fork":false,"pushed_at":"2023-07-23T13:59:39.000Z","size":9,"stargazers_count":86,"open_issues_count":0,"forks_count":13,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-08-04T01:10:18.156Z","etag":null,"topics":["rasperrypi","telegraf","temperature"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TheMickeyMike.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-04-17T16:36:59.000Z","updated_at":"2024-03-16T13:24:13.000Z","dependencies_parsed_at":"2024-01-08T07:58:46.206Z","dependency_job_id":"42ef5c31-19ba-4105-bb30-ab7440f11943","html_url":"https://github.com/TheMickeyMike/raspberrypi-temperature-telegraf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheMickeyMike%2Fraspberrypi-temperature-telegraf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheMickeyMike%2Fraspberrypi-temperature-telegraf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheMickeyMike%2Fraspberrypi-temperature-telegraf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheMickeyMike%2Fraspberrypi-temperature-telegraf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheMickeyMike","download_url":"https://codeload.github.com/TheMickeyMike/raspberrypi-temperature-telegraf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225277997,"owners_count":17448802,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["rasperrypi","telegraf","temperature"],"created_at":"2024-08-04T01:02:11.486Z","updated_at":"2024-11-19T01:30:57.925Z","avatar_url":"https://github.com/TheMickeyMike.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# raspberrypi-temperature-telegraf\nCollect RaspberryPi CPU and GPU temperature with telegraf\n\n### How to use (No script required :fire:)\n1. Locate `vcgencmd` binary by executing shell command `/usr/bin/which vcgencmd`. Location may vary depending on `libraspberrypi-bin` package version.\n2. Before adding this to your _telegraf.conf_, replace `replace_with_vcgencmd_location` with real path returned in previous step. (ex.`/usr/bin/vcgencmd`).\n```shell\n[[inputs.file]] \n  files = [\"/sys/class/thermal/thermal_zone0/temp\"]\n  name_override = \"cpu_temperature\"\n  data_format = \"value\"\n  data_type = \"integer\"\n  \n[[inputs.exec]]\n  commands = [ \"replace_with_vcgencmd_location measure_temp\" ]\n  name_override = \"gpu_temperature\"\n  data_format = \"grok\"\n  grok_patterns = [\"%{NUMBER:value:float}\"]\n\n```\n3. Add telegraf user to video group ```sudo usermod -a -G video telegraf```\n4. ```sudo service telegraf stop;sudo service telegraf start```\n5. Run test ```telegraf -config /etc/telegraf/telegraf.conf -test```\n\n### How to use (Old way)\n1. Copy ```telegraf_pi_temp.sh``` to ```/usr/local/bin/telegraf_pi_temp.sh```\n2. Modify file permissions ```chmod +x /usr/local/bin/telegraf_pi_temp.sh```\n3. Add ```telegraf``` user to video group ```sudo usermod -a -G video telegraf```\n4. ```sudo service telegraf restart``` or ```sudo reboot```\n5. Add to your telegraf.conf snippet from ```telegraf.conf```\n6. Run test ```telegraf -config /etc/telegraf/telegraf.conf -test```\n\n### Data format\nTo get a human readable *cpu* temperature divide it by 1000 (in grafana use the math(/ 1000) function\n```json\n{\"cpu\":54768, \"gpu\":54.8}\n```\n\u003cimg src=\"http://i.imgur.com/tnenohv.png\" width=\"700\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTheMickeyMike%2Fraspberrypi-temperature-telegraf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTheMickeyMike%2Fraspberrypi-temperature-telegraf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTheMickeyMike%2Fraspberrypi-temperature-telegraf/lists"}