Skip to content

Commit 1dec21f

Browse files
committed
Add more information to README
1 parent a269eaa commit 1dec21f

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,27 @@ php artisan monitor:run HttpPing
2121
php artisan monitor:run SSLCertificate,DiskUsage
2222
```
2323

24+
## How It Works
25+
26+
Using the configuration file in your project, any number of monitors can be configured to check for problems with your server setup.
27+
28+
When the `monitor:run` artisan command is executed, either from the command line or using the Laravel command scheduler, the monitors run and
29+
alert if there is an issue. The alarm state is configurable, and alerts can be sent to the log, or via email, Pushover, and Slack.
30+
31+
##### Disk Usage Monitors
32+
33+
Disk usage monitors check the percentage of the storage space that is used on the given partition, and alert if the percentage exceeds the configurable alarm percentage.
34+
35+
##### HTTP Ping Monitors
36+
37+
HTTP Ping monitors perform a simple page request and alert if the HTTP status code is _not_ 200. They can optionally check that a certain phrase is included in the source of the page.
38+
39+
##### SSL Certificate Monitors
40+
41+
SSL Certificate monitors pull the SSL certificate for the configured URL and make sure it is valid for that URL. Wildcard and multi-domain certificates are supported.
42+
43+
The monitor will alert if the certificate is invalid or expired, and will also alert when the expiration date is approaching. The days on which to alert prior to expiration is also configurable.
44+
2445
## Installation and usage
2546

2647
You can install this package via composer using:
@@ -93,6 +114,24 @@ The default monitor configurations are:
93114
],
94115
```
95116

117+
## Alert Configuration
118+
119+
Alerts can be logged to the default log handler, or sent via email, Pushover, or Slack. Allowed values are `log`, `mail`, `pushover`, and `slack`.
120+
121+
The default alert configurations are:
122+
123+
```php
124+
'events' => [
125+
'whenDiskUsageHealthy' => ['log'],
126+
'whenDiskUsageAlarm' => ['log', 'mail'],
127+
'whenHttpPingUp' => ['log'],
128+
'whenHttpPingDown' => ['log', 'mail'],
129+
'whenSSLCertificateValid' => ['log'],
130+
'whenSSLCertificateInvalid' => ['log', 'mail'],
131+
'whenSSLCertificateExpiring' => ['log', 'mail'],
132+
],
133+
```
134+
96135
## Scheduling
97136

98137
After you have performed the basic installation you can start using the monitor:run command. In most cases you'll want to schedule this command so you don't have to manually run monitor:run every time you want to know the health of your server.

0 commit comments

Comments
 (0)