maspepeasik/Mikrotik--Reporting-Bot ? reverse-engineered prompt
Reverse engineered prompt
Build me a Telegram bot in Python that monitors a MikroTik router using SNMP and sends network reports to a Telegram group.
I want it to poll the router every 5 minutes for CPU, RAM, interface status, and traffic in and out, then save the data locally in SQLite and keep only the last 6 months. It should be smart enough to handle counter resets so the traffic totals stay accurate, and it should also track when interfaces go down or come back up.
Please add automatic alerts if the bot cannot reach the router, then send a recovery message when it works again so it does not spam the group. I also want scheduled reports every Friday morning and every month on the 1st, plus simple commands to request weekly and monthly reports on demand.
Make it easy to run as a Linux service with a setup script, and include a way to test SNMP and Telegram before turning it on for real.
Are you gonna build this?
make sure you review the code using coderabbit