From 76ffca561fa6a2d5df28374498eec3662b5e145e Mon Sep 17 00:00:00 2001 From: lyc8503 Date: Sun, 19 Nov 2023 00:10:50 +0800 Subject: [PATCH] update readme & config --- README.md | 16 ++++----- uptime.config.ts | 89 +++++++----------------------------------------- 2 files changed, 19 insertions(+), 86 deletions(-) diff --git a/README.md b/README.md index e449fa9..fe0d3fc 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# ⚡UptimeFlare +# 📈UptimeFlare Another **serverless (and free!)** uptime monitoring & status page on Cloudflare Workers with more advanced features and nice UI. ## ⭐Features -- **Opensource** & Easy to deploy (in 10 minutes) & Free +- **Opensource** & Easy to deploy (in 10 minutes **without local tools**) & Free #### Monitoring @@ -22,7 +22,7 @@ Another **serverless (and free!)** uptime monitoring & status page on Cloudflare - Customizable status page - Use your own domain with CNAME -## 📈Demo +## 👀Demo My status page (Online demo): https://uptimeflare.pages.dev/ @@ -30,15 +30,13 @@ Some screenshots: ![Desktop, Light theme](docs/desktop.png) -## ⚡Quickstart +## ⚡Quickstart / 📄Documentation -Please refer to [Quickstart](https://github.com/lyc8503/UptimeFlare/wiki/Quickstart) - -## 📄Documentation +Please refer to [Quickstart](https://github.com/lyc8503/UptimeFlare/wiki/Quickstart) and (https://github.com/lyc8503/UptimeFlare/wiki) ## TODOs -- SSL? -- Slack / Telegram +- SSL certificate checks +- Slack / Telegram webhook example - Incident timeline - Email notification via Cloudflare Email Workers diff --git a/uptime.config.ts b/uptime.config.ts index 1171884..8b53dde 100644 --- a/uptime.config.ts +++ b/uptime.config.ts @@ -1,3 +1,5 @@ +// Refer to https://github.com/lyc8503/UptimeFlare/wiki/Configuration for detailed information + const config = { dateLocale: 'zh-CN', timezone: 'Asia/Shanghai', @@ -10,100 +12,33 @@ const config = { ], }, callback: async (statusChangeMsg: string) => { - await fetch('https://server.lyc8503.site/wepush?key=wepushkey&msg=' + statusChangeMsg) + // Add your own callback here }, monitors: [ { id: 'github', name: 'Github Monitor', method: 'GET', - target: 'https://github.com', - expectedCode: [200], - timeout: 10000, - headers: { - 'User-Agent': 'Uptimeflare', - }, - body: undefined, + target: 'https://github.com' }, { id: 'cloudflare', name: 'Cloudflare Monitor', method: 'GET', target: 'https://cloudflare.com', - expectedCode: [200], - timeout: 10000, + timeout: 5000, headers: { 'User-Agent': 'Uptimeflare', - }, - body: undefined, + } }, { - id: 'blog', - name: 'My Blog', - 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', + id: 'sshtest', + name: 'SSH Server', method: 'TCP_PING', - target: '20.24.87.148:22', - timeout: 10000, - }, - { - 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', - }, - ], + target: '1.1.1.1:22', + timeout: 5000 + } + ] } export default config