This project helps automate and simplify the process of checking ONU DBm values directly from a web interface without manual OLT login.
- Auto collect ONU optical info (Dbm values) from multiple OLTs (Huawei).
- Auto collect PPPoE active sessions from MikroTik routers.
- Match PPPoE Username with ONU MAC Address.
- Django based webpanel to search by PPPoE ID and view ONU DBm easily.
- Completely API-driven and database updated in real-time.
- Python (Paramiko, PyYAML, MySQL Connector, RouterOS API)
- Django (Web Framework)
- MySQL (Database)
- Cron Jobs (for Automation)
onu-dbm-checker/ ├── collector/ ├── onu_webpanel/ ├── webpanel/ ├── config.yaml ├── db_schema.sql ├── requirements.txt ├── manage.py
-
Clone the repository
git clone https://github.com/yourusername/onu-dbm-checker.git cd onu-dbm-checker -
Install dependencies
pip install -r requirements.txt
-
Set up the MySQL database
mysql -u root -p < db_schema.sql -
Edit the
config.yamlwith your OLT and MikroTik device credentials. -
Run initial Django migrations
python manage.py migrate
-
Start the Django server
python manage.py runserver 0.0.0.0:8000
-
Setup Cron Jobs
*/5 * * * * /usr/bin/python3 /path/to/collector/olt_dbm_fetcher.py */5 * * * * /usr/bin/python3 /path/to/collector/mikrotik_pppoe_fetcher.py
-
Access the web panel
http://your_server_ip:8000/search/
- Add user authentication for search panel.
- Multi-OLT Vendor Support (BDCOM, VSOL).
- ONT Authentication Status Monitoring.
- Real-time WebSocket Updates.
Python version: Python 3.10+
Django version: Django 4.x
Database: MySQL 8.0+
Server: Ubuntu 22.04 LTS recommended
MIT License