/
laravel-uptime-monitor.php
114 lines (94 loc) · 4.23 KB
/
laravel-uptime-monitor.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<?php
return [
/*
* You can get notified when specific events occur. Out of the box you can use 'mail'
* and 'slack'. Of course you can also specify your own notification classes.
*/
'notifications' => [
'notifications' => [
\Spatie\UptimeMonitor\Notifications\Notifications\UptimeCheckFailed::class => ['slack'],
\Spatie\UptimeMonitor\Notifications\Notifications\UptimeCheckRecovered::class => ['slack'],
\Spatie\UptimeMonitor\Notifications\Notifications\UptimeCheckSucceeded::class => [],
\Spatie\UptimeMonitor\Notifications\Notifications\CertificateCheckFailed::class => ['slack'],
\Spatie\UptimeMonitor\Notifications\Notifications\CertificateExpiresSoon::class => ['slack'],
\Spatie\UptimeMonitor\Notifications\Notifications\CertificateCheckSucceeded::class => [],
],
/*
* The location from where you are running this Laravel application. This location will be
* mentioned in all notifications that will be sent.
*/
'location' => '',
/*
* To keep reminding you that a site is down, notifications
* will be resent every given number of minutes.
*/
'resend_uptime_check_failed_notification_every_minutes' => 60,
'mail' => [
'to' => 'your@email.com',
],
'slack' => [
'webhook_url' => env('UPTIME_MONITOR_SLACK_WEBHOOK_URL'),
],
/*
* Here you can specify the notifiable to which the notifications should be sent. The default
* notifiable will use the variables specified in this config file.
*/
'notifiable' => \Spatie\UptimeMonitor\Notifications\Notifiable::class,
/*
* The date format used in notifications.
*/
'date_format' => 'd/m/Y',
],
'uptime_check' => [
/*
* When the uptime check could reach the url of a monitor it will pass the response to this class
* If this class determines the response is valid, the uptime check will be regarded as succeeded.
*
* You can use any implementation of Spatie\UptimeMonitor\Helpers\UptimeResponseCheckers\UptimeResponseChecker here.
*/
'response_checker' => Spatie\UptimeMonitor\Helpers\UptimeResponseCheckers\LookForStringChecker::class,
/*
* An uptime check will be performed if the last check was performed more than the
* given number of minutes ago. If you change this setting you have to manually
* update the `uptime_check_interval_in_minutes` value of your existing sites.
*
* When a site is down we'll check the uptime every time `sites:check-uptime` runs
* regardless of this setting.
*/
'run_interval_in_minutes' => 5,
/*
* To speed up the uptime checking process uptime monitor can check multiple sites
* concurrently. Set this to a lower value if you're getting weird errors
* running the uptime check.
*/
'concurrent_checks' => 10,
/*
* The uptime check for a site will fail if site does not respond after the
* given number of seconds.
*/
'timeout_per_site' => 10,
/*
* Fire `Spatie\UptimeMonitor\Events\MonitorFailed` event only after
* the given number of checks have consecutively failed for a site.
*/
'fire_monitor_failed_event_after_consecutive_failures' => 2,
/*
* When reaching out to sites this user agent will be used.
*/
'user_agent' => 'spatie/laravel-uptime-monitor uptime checker',
],
'certificate_check' => [
/*
* The `Spatie\UptimeMonitor\Events\SslExpiresSoon` event will fire
* when a certificate is found whose expiration date is in
* the next number of given days.
*/
'fire_expiring_soon_event_if_certificate_expires_within_days' => 10,
],
/*
* To add or modify behaviour to the Site model you can specify your
* own model here. The only requirement is that it should extend
* `Spatie\UptimeMonitor\Test\Models\Site`.
*/
'monitor_model' => Spatie\UptimeMonitor\Models\Monitor::class,
];