Add README.md
This commit is contained in:
commit
4e72174670
1 changed files with 63 additions and 0 deletions
63
README.md
Normal file
63
README.md
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
# Website Monitor
|
||||||
|
|
||||||
|
A simple web service for monitoring website availability.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- Monitor multiple websites simultaneously
|
||||||
|
- Customizable status updates and incident messages
|
||||||
|
- Easy configuration via JSON
|
||||||
|
- Automated monitoring with cron jobs
|
||||||
|
- Markdown support for messages
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
- PHP with write permissions
|
||||||
|
- Cron (optional, for automated monitoring)
|
||||||
|
- [Parsedown](https://parsedown.org) library (included)
|
||||||
|
|
||||||
|
## Setup
|
||||||
|
|
||||||
|
### 1. Installation
|
||||||
|
|
||||||
|
1. Upload all files to your web server
|
||||||
|
2. Ensure PHP has write permissions for the `monitors` directory
|
||||||
|
|
||||||
|
### 2. Configure Monitored Websites
|
||||||
|
|
||||||
|
Edit `monitors.json` to add websites you want to monitor:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"example.com": "https://example.com",
|
||||||
|
"wikipedia.org": "https://www.wikipedia.org"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. Optional Customizations
|
||||||
|
|
||||||
|
#### Status Updates
|
||||||
|
- Create Markdown files in the `updates` directory
|
||||||
|
- Filename should match the website name (e.g., `example.com.md`)
|
||||||
|
|
||||||
|
#### Incident Messages
|
||||||
|
Place Markdown files in the `incidents` directory:
|
||||||
|
- Default: Informational message (gray)
|
||||||
|
- `alert_*` prefix: Alert message (red)
|
||||||
|
- `notice_*` prefix: Notice message (yellow)
|
||||||
|
|
||||||
|
### 4. Automate Monitoring
|
||||||
|
|
||||||
|
Add this to your crontab to run monitoring every minute:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
* * * * * /usr/bin/php -f /path/to/monitor.php >/dev/null 2>&1
|
||||||
|
```
|
||||||
|
|
||||||
|
## Dependencies
|
||||||
|
|
||||||
|
- [Parsedown](https://parsedown.org): Markdown rendering library
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
- Ensure proper file permissions for monitoring functionality
|
Loading…
Reference in a new issue