Router Pulse is a small system, written on Lumen, for remote monitoring router state and gathering statistic about Internet downtime. It support 2 provider monitoring. Script for Mikrotik routers is included.
-
Unpack archive or checkout from repository.
-
cd router-pulse root directory
-
Run Composer install:
composer install
-
Copy .env.example to .env and edit settings in this file.
-
Create MySQL database, and configure connection in .env file
-
Migrate database:
php artisan migrate
-
Configure your web-server DocumentRoot directory to router-pulse/public
-
Add http auth in https://{YOUR-DOMAIN}/settings directory (optionality)
-
Add script to scheduler in your router, it must every minute get url in format:
https://{YOUR-DOMAIN}/ping?key={ROUTER_KEY}&isp1={ISP1-STATUS}&isp2={ISP2-STATUS}
Sample for Mikrotik: routers/mikrotik.txt
- Change config notifications in https://{YOUR-DOMAIN}/settings add telegram or(and) viber APIkey
set webhook: https://{YOUR-DOMAIN}/telegram/sethook https://{YOUR-DOMAIN}/viber/sethook
-
Send message to telegram or viber bot and get your id Insert id in https://{YOUR-DOMAIN}/settings Save changes
-
Add to crontab "curl https://{YOUR-DOMAIN}/scheduler" for execution every minute
Current state is available at the page: http://{YOUR-DOMAIN}/ History for last 30 days available at the page: http://{YOUR-DOMAIN}/statistics