-
Notifications
You must be signed in to change notification settings - Fork 2
/
config.js
55 lines (55 loc) · 2.57 KB
/
config.js
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
47
48
49
50
51
52
53
54
55
export default {
interval : 15, // Interval in minutes between each pulse
nDataPoints : 90, // Number of datapoints to display on the dashboard
responseTimeGood : 300, // In milliseconds, this and below will be green
responseTimeWarning : 600, // In milliseconds, above this will be red
timeout : 5000, // In milliseconds, requests will be aborted above this
verbose : true, // Whether or not to output pulse messages in the console
readableStatusJson : true, // Format status.json to be human readable
logsMaxDatapoints : 200, // Maximum datapoints history to keep (per endpoint)
telegram : { // optional, tokens to send notifications through telegram
botToken : '', // Contact @BotFather on telegram to create a bot
chatId : '',// Send a message to the bot, then visit https://api.telegram.org/bot<token>/getUpdates to get the chatId
},
slack : { // optional, tokens to send notifications through slack
botToken : '',
channelId : '',
},
discord : { // optional, tokens to send notifications through discord
webhookUrl : '',
},
twilio : { // optional, tokens to send notifications through twilio (SMS)
accountSid : '',
accountToken : '',
toNumber : '',
twilioNumber : '',
},
sendgrid : { // optional, tokens to send notifications through sendgrid (Email)
apiKey : '',
toEmail : '',
toFromEmail : '',
},
consecutiveErrorsNotify : 1, // After how many consecutive Errors events should we send a notification
consecutiveHighLatencyNotify : 3, // After how many consecutive High latency events should we send a notification
sites : [ // List of sites to monitor
{
id : 'google', // optional
name : 'Google',
endpoints : [ // Each site is a bunch of endpoints that can be tested
{
id : 'homepage', // optional
name : 'Homepage', // optional
link : 'https://www.google.com', // optional, for notifications and dashboard only, [defaults to endpoint.url], can be disabled by setting it to false
url : 'https://www.google.com', // required
request : { // optional, fetch options
method: 'GET',
},
mustFind : 'Feeling Lucky', // optional, String | Array | Regex | Function | AsyncFunction
mustNotFind : /Page not found/i, // optional, String | Array | Regex | Function | AsyncFunction
customCheck : async (content, response)=>{return true;}, // optional, Function | AsyncFunction -> Run your own custom checks return false in case of errors
validStatus : [200], // optional, Which http status should be considered non errors [defaults to 200-299]
}
]
}
],
};