base on A self-hosted web monitoring tool, built with laravel # Uptime Monitor
Uptime Monitor is a self-hosted web monitoring tool, built with laravel.
## Features
- Monitor your web uptime per minutes (or any time interval)
- Record response time on each web
- Show uptime badges in 3 colors: green for up, yellow for warning, red for down, based on response time
- Send telegram notification when you site down for 5 minutes (based on check periode)
## Why I need this?
- Open-source, modify as you need
- Self-hosted, deploy on your own server
- Store and control your monitoring logs yourself
- Let you know when your websites are down
- For freelancer/agency, increase your client's trust because you monitor their website
## How to Install
### Server Requirements
This application can be installed on local server and online server with these specifications:
1. PHP 8.1 (and meet [Laravel 10.x requirements](https://laravel.com/docs/10.x/deployment#server-requirements)).
2. MySQL or MariaDB Database.
3. SQLite (for automated testing).
### Installation Steps
1. Clone repository: `git clone https://github.com/nafiesl/uptime-monitor.git`
1. `$ cd uptime-monitor`
1. Install PHP dependencies: `$ composer install`
1. Install javscript dependencies: `$ npm install`
1. Copy `.env.example` to `.env`: `$ cp .env.example .env`
1. Generate application key: `$ php artisan key:generate`
1. Create a MySQL or MariaDB database.
1. Configure database and environment variables `.env`.
```
APP_URL=http://localhost:8000
APP_TIMEZOME="Asia/Jakarta"
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret
TELEGRAM_NOTIFER_TOKEN=
```
1. Run database migration: `$ php artisan migrate --seed`
1. Build assets: `$ npm run build`
1. Run task scheduler: `$ php artisan schedule:work`
1. Start server in a separeted terminal tab: `$ php artisan serve`
1. Open the web app: http://localhost:8000.
1. Login using default user credential:
- Email: `
[email protected]`
- Password: `password`
1. Go to **Customer Site** menu.
1. Add some new customer sites (name and URL).
1. After adding customer sites, go to **Dashboard**
1. Click **Start Monitoring** to update the uptime badge per minute.
### Telegram Notifier Setup
In order to get notified in Telegram when the customer sites are down, we need to use a Telegram Bot and a Chat ID
1. Create a Telegram Bot ([how to](https://gist.github.com/nafiesl/4ad622f344cd1dc3bb1ecbe468ff9f8a#create-a-telegram-bot-and-get-a-bot-token))
1. Get a Chat ID of the Telegram Bot ([how to](https://gist.github.com/nafiesl/4ad622f344cd1dc3bb1ecbe468ff9f8a#get-chat-id-for-a-private-chat))
1. Update `.env` file, set `TELEGRAM_NOTIFER_TOKEN=your_telegram_bot_token`
1. Set our Chat ID in the Profile Page.
- Go to User Profile Menu
- Click Edit Profile
- Fill the Telegram Chat ID field with `your_chat_id`
- Click Update Profile
- Click **Test Telegram Chat** to test the telegram configuration
1. By default, we will have **5 minutes** inteval when the customer sites are down. But we can change the interval per customer sites.
- Go to Customer Site menu
- Select one of the customer site and click Edit link
- Set the Notify User Interval field, between 0 to 60.
- Set the Notify User Interval field to 0 if you don't want to get notified.
## Screenshot
#### Dashboard

#### Dashboard in mobile device

#### Monitoring graph on customer site detail

#### Monitoring log tab on customer site detail

#### User profile menu

#### Telegram notification sample

## Lisensi
Uptime Monitor project is an open-sourced software licensed under the [Lisensi MIT](LICENSE).
", Assign "at most 3 tags" to the expected json: {"id":"6204","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"