This commit is contained in:
Mateusz Gruszczyński
2026-01-02 22:57:07 +01:00
parent 69711b46bc
commit ca3cc57773
4 changed files with 15 additions and 17 deletions

View File

@@ -1,11 +1,13 @@
# .env.example - Template for environment variables # .env.example - Template for environment variables
# Copy to .env and customize # Copy to .env and customize
SECRET_KEY=change-me
# GPON Device # GPON Device
GPON_HOST=192.168.100.1 GPON_HOST=192.168.100.1
GPON_PORT=23 GPON_PORT=23
GPON_USERNAME=admin GPON_USERNAME=leox
GPON_PASSWORD=admin GPON_PASSWORD=leolabs_7
# Web Server # Web Server
LISTEN_HOST=0.0.0.0 LISTEN_HOST=0.0.0.0

View File

@@ -34,4 +34,4 @@ ENV LISTEN_PORT=8080
EXPOSE $LISTEN_PORT EXPOSE $LISTEN_PORT
# Run app # Run app
CMD ["python", "app.py"] CMD ["sh", "-c", "gunicorn --bind 0.0.0.0:${LISTEN_PORT} --workers 1 --threads 2 --access-logfile - --error-logfile - app:app"]

View File

@@ -2,12 +2,15 @@
Real-time monitoring for ONT/ONU GPON devices via OMCI telnet and web scraping with RRD-based historical graphs. Real-time monitoring for ONT/ONU GPON devices via OMCI telnet and web scraping with RRD-based historical graphs.
Work with LXT-010 S-H / H-D.
Tested on GPON stick SFP+ LXT-010S-H
## Quick Start ## Quick Start
### 1. Clone or download the project ### 1. Clone or download the project
```bash ```bash
git clone <repo-url> https://gitea.linuxiarz.pl/gru/leox-gpon-monitoring
cd gpon-monitor cd leox-gpon-monitoring
``` ```
### 2. Configure .env file ### 2. Configure .env file
@@ -19,8 +22,8 @@ nano .env
Edit basic parameters: Edit basic parameters:
```env ```env
GPON_HOST=192.168.100.1 GPON_HOST=192.168.100.1
GPON_USERNAME=admin GPON_USERNAME=leox
GPON_PASSWORD=admin GPON_PASSWORD=leolabs_7
EXTERNAL_PORT=8080 EXTERNAL_PORT=8080
``` ```
@@ -99,14 +102,6 @@ TX_POWER_MAX=4.0
TEMPERATURE_MAX=85.0 TEMPERATURE_MAX=85.0
``` ```
## Docker Details
- Base image: Python 3.11 Alpine
- Volumes: `./data/rrd:/data/rrd`
- Network: Bridge
- Healthcheck: `/api/current` endpoint
- Restart policy: unless-stopped
## API Endpoints ## API Endpoints
```bash ```bash
@@ -161,7 +156,7 @@ docker-compose up -d
- Docker - Docker
- Docker Compose - Docker Compose
- ONT device with telnet access (port 23) - LEOX device with telnet access (port 23)
## Development ## Development

View File

@@ -3,3 +3,4 @@ gunicorn==21.2.0
python-dotenv==1.0.0 python-dotenv==1.0.0
telnetlib3==2.0.4 telnetlib3==2.0.4
aiohttp aiohttp
gunicorn