This is the documentation for
v2 but the latest version is
v3
.
You can switch versions in the menu on the left/at the top.
Check your current version with the following command:
composer show spatie/laravel-uptime-monitor
Using the monitor:create
becomes tedious fast if you have a large number of urls that you wish to monitor. Luckily there's also a command to bulk import urls from a json file:
php artisan monitor:sync-file <path-to-file>
Here's an example of the structure that json file should have:
[
{
"url": "https://www.example.com",
"uptime_check_enabled": true,
"certificate_check_enabled": true
},
{
"url": "http://www.another-example.com",
"uptime_check_enabled": true,
"certificate_check_enabled": false
}
]
By default the command will import all missing urls and update existing urls. If you wish to delete urls from the database that are not in the json file you can use the --delete-missing
flag.