Update uptime.config.ts

pull/140/head
吴雨涵 2024-09-17 11:38:32 +08:00 committed by GitHub
parent be832b0312
commit 0303dc2991
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 26 additions and 63 deletions

View File

@ -1,79 +1,42 @@
const pageConfig = { const pageConfig = {
// Title for your status page title: "凌云·LinYun 服务状态",
title: "lyc8503's Status Page",
// Links shown at the header of your status page, could set `highlight` to `true`
links: [ links: [
{ link: 'https://github.com/lyc8503', label: 'GitHub' }, { link: 'https://www.linyunlink.top/links/', label: '友情链接'},
{ link: 'https://blog.lyc8503.net/', label: 'Blog' }, { link: 'https://www.linyunlink.top/', label: '博客', highlight: true },
{ link: 'mailto:me@lyc8503.net', label: 'Email Me', highlight: true },
], ],
} }
const workerConfig = { const workerConfig = {
// Write KV at most every 3 minutes unless the status changed // Write KV at most every 3 minutes unless the status changed.
kvWriteCooldownMinutes: 3, kvWriteCooldownMinutes: 10,
// Enable HTTP Basic auth for status page & API by uncommenting the line below, format `<USERNAME>:<PASSWORD>`
// passwordProtection: 'username:password',
// Define all your monitors here // Define all your monitors here
monitors: [ monitors: [
// Example HTTP Monitor // ==========[凌云服务监控]==========
{ {
// `id` should be unique, history will be kept if the `id` remains constant id: 'linyun_blog_monitor',
id: 'foo_monitor', name: '凌云·LinYun 博客',
// `name` is used at status page and callback message method: 'GET',
name: 'My API Monitor', target: 'https://www.linyunlink.top/',
// `method` should be a valid HTTP Method tooltip: '凌云·LinYun 博客',
statusPageLink: 'https://www.linyunlink.top/',
},
{
id: 'linyun_twikoo_monitor',
name: '凌云·LinYun Twikoo评论系统',
method: 'POST', method: 'POST',
// `target` is a valid URL target: 'https://twikoo.linyunlink.top/',
target: 'https://example.com', tooltip: '凌云·LinYun Twikoo 评论服务后端',
// [OPTIONAL] `tooltip` is ONLY used at status page to show a tooltip statusPageLink: 'https://twikoo.linyunlink.top/',
tooltip: 'This is a tooltip for this monitor',
// [OPTIONAL] `statusPageLink` is ONLY used for clickable link at status page
statusPageLink: 'https://example.com',
// [OPTIONAL] `expectedCodes` is an array of acceptable HTTP response codes, if not specified, default to 2xx
expectedCodes: [200],
// [OPTIONAL] `timeout` in millisecond, if not specified, default to 10000
timeout: 10000,
// [OPTIONAL] headers to be sent
headers: {
'User-Agent': 'Uptimeflare',
Authorization: 'Bearer YOUR_TOKEN_HERE',
}, },
// [OPTIONAL] body to be sent
body: 'Hello, world!',
// [OPTIONAL] if specified, the response must contains the keyword to be considered as operational.
responseKeyword: 'success',
// [OPTIONAL] if specified, the check will run in your specified region,
// refer to docs https://github.com/lyc8503/UptimeFlare/wiki/Geo-specific-checks-setup before setting this value
checkLocationWorkerRoute: 'https://xxx.example.com',
},
// Example TCP Monitor
{ {
id: 'test_tcp_monitor', id: 'linyun_image_monitor',
name: 'Example TCP Monitor', name: '凌云·LinYun 图片托管站',
// `method` should be `TCP_PING` for tcp monitors method: 'GET',
method: 'TCP_PING', target: 'https://image.linyunlink.top/',
// `target` should be `host:port` for tcp monitors tooltip: '凌云·LinYun 图片托管站',
target: '1.2.3.4:22', statusPageLink: 'https://image.linyunlink.top/',
tooltip: 'My production server SSH', }
statusPageLink: 'https://example.com',
timeout: 5000,
},
], ],
notification: {
// [Optional] apprise API server URL
// if not specified, no notification will be sent
appriseApiServer: "https://apprise.example.com/notify",
// [Optional] recipient URL for apprise, refer to https://github.com/caronc/apprise
// if not specified, no notification will be sent
recipientUrl: "tgram://bottoken/ChatID",
// [Optional] timezone used in notification messages, default to "Etc/GMT"
timeZone: "Asia/Shanghai",
// [Optional] grace period in minutes before sending a notification
// notification will be sent only if the monitor is down for N continuous checks after the initial failure
// if not specified, notification will be sent immediately
gracePeriod: 5,
},
callbacks: { callbacks: {
onStatusChange: async ( onStatusChange: async (
env: any, env: any,