https://github.com/bugswriter/pve2influx
https://github.com/bugswriter/pve2influx
Last synced: 20 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/bugswriter/pve2influx
- Owner: Bugswriter
- Created: 2023-11-22T07:04:46.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-05-01T20:37:07.000Z (about 2 years ago)
- Last Synced: 2025-02-22T21:14:21.036Z (over 1 year ago)
- Language: Python
- Size: 41 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# System Monitoring Scripts
This repository contains Python scripts for gathering host machine information and sending it to InfluxDB. The scripts cover various aspects, including disk statistics, KVM virtual machine status, and sensor readings.
## Prerequisites
Make sure you have the following installed on your system:
- Python 3.x
- InfluxDB
- [InfluxDB Python Client](https://github.com/influxdata/influxdb-client-python)
## Installation
Run this line to install.
```bash
bash -c "$(curl -fsSL https://bugswriter.com/pve2influx-install.sh)"
```
## Usage
1. Clone the repository:
```bash
git clone https://github.com/bugswriter/pve2influx.git
cd pve2influx
```
2. Set up a virtual environment (optional but recommended):
```bash
python -m venv env
source env/bin/activate
```
3. Install dependencies:
```bash
pip install -r requirements.txt
```
4. Set up your InfluxDB configuration by creating a `.env` file with the following variables:
```env
INFLUX_URL="https://your-influxdb-url:8086"
INFLUX_TOKEN="your-influxdb-token"
INFLUX_ORG="your-influxdb-organization"
INFLUX_BUCKET="your-influxdb-bucket"
```
5. Run the desired scripts:
```bash
python disk.py
python vmstatus.py
python sensors.py
# Add more scripts as needed
```
## Scripts
### 1. disk.py
This script retrieves disk statistics and sends them to InfluxDB.
### 2. vmstatus.py
Monitors the status of KVM virtual machines and logs the information to InfluxDB.
### 3. sensors.py
Gathers sensor readings from the host machine and stores them in InfluxDB.
## Contributing
Feel free to contribute by opening issues, suggesting improvements, or submitting pull requests.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.