A CLI program that helps you check your endpoints by requesting the given servers and send a report message in any supported channel like Telegram
A CLI program that help you check your endpoints by requesting the given servers and send a report message in any supported channel ( Telegram )
git clone https://github.com/husseinferas/api-monitor && cd api-monitor
composer install
cp .env.example .env
.env
file:CONSUMER_KEY=[your-app-key]
DB_DATABASE=[your-sqlite-database-file-path]
DATA_SEED=[your-data-seed-file]
TELEGRAM_TOKEN=[your-telegram-token]
TELEGRAM_CHAT=[your-chat-id-which-chat-you-want-to-send]
cp data.example.php .data.php
data.php
and add your endpointsreturn [
[
'app' => 'app-name',
'name' => 'endpoint-name',
'url' => 'endpoint-url',
],
];
php api-monitor migrate:fresh --seed
Setup telegram channel:
curl https://api.telegram.org/bot$[TELEGRAM_BOT_TOKEN]/getUpdates
Now you can test the application using this command:
php api-monitor check
Note: you can add this command to crontab and setup a schedule for monitoring.
Pull requests are welcome. For major changes.
API Monitor is an open-source software licensed under the MIT license.