![屏幕截图 2024-05-23 011054](https://private-user-images.githubusercontent.com/20140506/332895271-e30c0127-bd8d-4a72-948e-b9211f060e9b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg5OTY2NzIsIm5iZiI6MTcxODk5NjM3MiwicGF0aCI6Ii8yMDE0MDUwNi8zMzI4OTUyNzEtZTMwYzAxMjctYmQ4ZC00YTcyLTk0OGUtYjkyMTFmMDYwZTliLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjIxVDE4NTkzMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTY2ZTY2ZDc4YTQ2NTBmNjQ0MmQ1NTRlODk4YTg4MzQ0NjhjOWRjYzQ5YmM5MmI0ZGM4NTM5NzdlOTE4NDU5YWMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.K-q5RSTHVVU6bopQA-26KfLGa_7LFCNvLom1ry2rO8s)
const pageConfig = {
// Title for your status page
title: "CFuptime",
// Links shown at the header of your status page, could set highlight
to true
links: [
{ link: 'https://github.com/lyc8503', label: 'GitHub' },
{ link: 'https://blog.lyc8503.site/', label: 'Blog' },
{ link: 'mailto:[email protected]', label: 'Email Me', highlight: true },
],
}
const workerConfig = {
// Write KV at most every 3 minutes unless the status changed.
kvWriteCooldownMinutes: 3,
// Define all your monitors here
monitors: [
// Example HTTP Monitor
{
// id
should be unique, history will be kept if the id
remains constant
id: 'Serv00Alist',
// name
is used at status page and callback message
name: 'serv00的Alist',
// method
should be a valid HTTP Method
method: 'GET',
// target
is a valid URL
target: 'httpowobaba.rocks/',
statusPageLink: 'hocks/',
expectedCodes: [200-299],
timeout: 5000,
},
{
id: 'uptime',
name: 'colocrossing的Uptime',
method: 'GET',
target: 'https://uptimcluhboard/',
statusPageLink: 'https:zboard/',
expectedCodes: [200-299],
timeout: 5000
},
{
id: 'tiebayunqian',
name: '贴吧云签到',
method: 'GET',
target: 'https://tmsl.h/',
statusPageLink: 'httn-msh/',
expectedCodes: [200-299],
timeout: 5000
},
{
id: 'Serv00nezha',
name: 'Serv00的nezha',
method: 'GET',
target: 'https://nme/',
statusPageLink: 'https://asil.me/',
expectedCodes: [200-299],
timeout: 5000
},
{
id: 'Serv00tgState',
name: 'Serv00的tgState',
method: 'GET',
target: 'htt',
statusPageLink: 'httks/',
expectedCodes: [200-299],
timeout: 5000
},
{
id: 'U2',
name: 'U2动漫花园',
method: 'GET',
target: 'https://u2.dmhy.org/',
statusPageLink: 'https://u2.dmhy.org/',
expectedCodes: [200-299],
timeout: 5000
},
// Example TCP Monitor
{
id: 'test_tcp_monitor',
name: 'colocrossing',
// method
should be TCP_PING
for tcp monitors
method: 'TCP_PING',
// target
should be host:port
for tcp monitors
target: '10:22',
tooltip: 'My production server SSH',
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: {
onStatusChange: async (
env: any,
monitor: any,
isUp: boolean,
timeIncidentStart: number,
timeNow: number,
reason: string
) => {
// This callback will be called when there's a status change for any monitor
// Write any Typescript code here
// This will not follow the grace period settings and will be called immediately when the status changes
// You need to handle the grace period manually if you want to implement it
},
onIncident: async (
env: any,
monitor: any,
timeIncidentStart: number,
timeNow: number,
reason: string
) => {
// This callback will be called EVERY 1 MINTUE if there's an on-going incident for any monitor
// Write any Typescript code here
},
},
}
// Don't forget this, otherwise compilation fails.
export { pageConfig, workerConfig }