update readme & config

pull/5/head
lyc8503 2023-11-19 00:10:50 +08:00
parent 4f18b3fd66
commit 76ffca561f
2 changed files with 19 additions and 86 deletions

View File

@ -1,10 +1,10 @@
# UptimeFlare # 📈UptimeFlare
Another **serverless (and free!)** uptime monitoring & status page on Cloudflare Workers with more advanced features and nice UI. Another **serverless (and free!)** uptime monitoring & status page on Cloudflare Workers with more advanced features and nice UI.
## ⭐Features ## ⭐Features
- **Opensource** & Easy to deploy (in 10 minutes) & Free - **Opensource** & Easy to deploy (in 10 minutes **without local tools**) & Free
#### Monitoring #### Monitoring
@ -22,7 +22,7 @@ Another **serverless (and free!)** uptime monitoring & status page on Cloudflare
- Customizable status page - Customizable status page
- Use your own domain with CNAME - Use your own domain with CNAME
## 📈Demo ## 👀Demo
My status page (Online demo): https://uptimeflare.pages.dev/ My status page (Online demo): https://uptimeflare.pages.dev/
@ -30,15 +30,13 @@ Some screenshots:
![Desktop, Light theme](docs/desktop.png) ![Desktop, Light theme](docs/desktop.png)
## ⚡Quickstart ## ⚡Quickstart / 📄Documentation
Please refer to [Quickstart](https://github.com/lyc8503/UptimeFlare/wiki/Quickstart) Please refer to [Quickstart](https://github.com/lyc8503/UptimeFlare/wiki/Quickstart) and (https://github.com/lyc8503/UptimeFlare/wiki)
## 📄Documentation
## TODOs ## TODOs
- SSL? - SSL certificate checks
- Slack / Telegram - Slack / Telegram webhook example
- Incident timeline - Incident timeline
- Email notification via Cloudflare Email Workers - Email notification via Cloudflare Email Workers

View File

@ -1,3 +1,5 @@
// Refer to https://github.com/lyc8503/UptimeFlare/wiki/Configuration for detailed information
const config = { const config = {
dateLocale: 'zh-CN', dateLocale: 'zh-CN',
timezone: 'Asia/Shanghai', timezone: 'Asia/Shanghai',
@ -10,100 +12,33 @@ const config = {
], ],
}, },
callback: async (statusChangeMsg: string) => { callback: async (statusChangeMsg: string) => {
await fetch('https://server.lyc8503.site/wepush?key=wepushkey&msg=' + statusChangeMsg) // Add your own callback here
}, },
monitors: [ monitors: [
{ {
id: 'github', id: 'github',
name: 'Github Monitor', name: 'Github Monitor',
method: 'GET', method: 'GET',
target: 'https://github.com', target: 'https://github.com'
expectedCode: [200],
timeout: 10000,
headers: {
'User-Agent': 'Uptimeflare',
},
body: undefined,
}, },
{ {
id: 'cloudflare', id: 'cloudflare',
name: 'Cloudflare Monitor', name: 'Cloudflare Monitor',
method: 'GET', method: 'GET',
target: 'https://cloudflare.com', target: 'https://cloudflare.com',
expectedCode: [200], timeout: 5000,
timeout: 10000,
headers: { headers: {
'User-Agent': 'Uptimeflare', 'User-Agent': 'Uptimeflare',
}, }
body: undefined,
}, },
{ {
id: 'blog', id: 'sshtest',
name: 'My Blog', name: 'SSH Server',
method: 'GET',
target: 'https://blog.lyc8503.site',
timeout: 10000,
},
{
id: 'pan',
name: 'My Fileshare',
method: 'GET',
target: 'https://pan.lyc8503.site',
timeout: 10000,
},
{
id: 'server',
name: 'My Aliyun Server',
method: 'GET',
target: 'https://server.lyc8503.site',
timeout: 10000,
},
{
id: 'homelab',
name: 'HomeLab',
method: 'GET',
target: 'https://lyc8503.cn4.quickconnect.cn/webstation/hello.txt',
timeout: 10000,
headers: {
Cookie: 'type=tunnel;',
},
responseKeyword: 'Hello',
},
{
id: 'homessh',
name: 'HomeSSH',
method: 'TCP_PING', method: 'TCP_PING',
target: '20.24.87.148:22', target: '1.1.1.1:22',
timeout: 10000, timeout: 5000
}, }
{ ]
id: 'broken-test',
name: 'Ping 1.1.1.1',
method: 'TCP_PING',
target: '1.1.1.1:1234',
},
{
id: '404test',
name: '404-test',
method: 'GET',
target: 'https://www.baidu.com/404',
},
{
id: '404test2',
name: '404-test2',
method: 'GET',
target: 'https://www.baidu.com/404',
expectedCodes: [404, 405],
},
{
id: '404test3',
name: '404-test3',
method: 'GET',
target: 'https://www.baidu.com/404',
expectedCodes: [404],
responseKeyword: 'Hello',
},
],
} }
export default config export default config