https://github.com/deishelon/linux_info_collector_mqtt
https://github.com/deishelon/linux_info_collector_mqtt
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/deishelon/linux_info_collector_mqtt
- Owner: Deishelon
- Created: 2022-09-05T09:43:56.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-09-10T05:03:58.000Z (over 2 years ago)
- Last Synced: 2025-01-18T17:29:27.871Z (5 months ago)
- Language: Python
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Linux Info Collector / MQTT
> Collect info from a linux PC/PI and report it back to MQTT (i.e. temperatures // avg load)# Use
- Clone the repo
- cd into the cloned dir
- `python3 -m venv venv`
- `. venv/bin/activate`
- `pip install -r requirements.txt`
- `deactivate`
- (Or easy one liner: `python3 -m venv venv && . venv/bin/activate && pip install -r requirements.txt && deactivate`)
- Create yaml config file (see sample for reference)
- Do a sample to make sure all works (i.e `./bootstrap.sh ../linux_info_collector_mqtt.yml`)# Cron job
- Open the cron editor: `crontab -e`
- Add the following line (ajust the paths to match your install) to run collection every 1 min:
```
* * * * * /home/pi/linux_info_collector_mqtt/bootstrap.sh /home/pi/linux_info_collector_mqtt.yml
```
- Save crontab and wait 1 min to see the new reports are coming from the device
- If something wrong with the cron job, you can start by debugging it with `grep CRON /var/log/syslog`