-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuptime.config.ts
More file actions
46 lines (42 loc) · 1.14 KB
/
uptime.config.ts
File metadata and controls
46 lines (42 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import { MaintenanceConfig, PageConfig, WorkerConfig } from './types/config'
const pageConfig: PageConfig = {
title: "Excelsior Status",
links: [
{ link: 'https://runexcelsior.org', label: 'Excelsior' },
],
}
const workerConfig: WorkerConfig = {
kvWriteCooldownMinutes: 3,
monitors: [
{
id: 'excelsior-website',
name: 'runexcelsior.org',
method: 'GET',
target: 'https://runexcelsior.org',
expectedCodes: [200],
timeout: 10000,
headers: {
'User-Agent': 'UptimeFlare',
},
},
],
notification: {
webhook: {
url: 'DISCORD_WEBHOOK_URL_PLACEHOLDER',
method: 'POST',
payloadType: 'json',
payload: { content: '$MSG' },
},
gracePeriod: 5,
},
callbacks: {
onStatusChange: async (env, monitor, isUp, timeIncidentStart, timeNow, reason) => {
// This callback runs when monitor status changes
},
onIncident: async (env, monitor, timeIncidentStart, timeNow, reason) => {
// This callback runs on each check when monitor is down
},
},
}
const maintenances: MaintenanceConfig[] = []
export { pageConfig, workerConfig, maintenances }