|
1 | 1 | import { defineConfig } from 'checkly'
|
2 | 2 | import { Frequency } from 'checkly/constructs'
|
| 3 | +import { WebhookAlertChannel } from 'checkly/constructs' |
| 4 | + |
| 5 | +export const webhookChannel = new WebhookAlertChannel('webhook-239286', { |
| 6 | + name: 'srebot-prod-webhook', |
| 7 | + method: 'POST', |
| 8 | + url: new URL('https://srebot-zys7.onrender.com/checkly-webhook'), |
| 9 | + sendRecovery: false, |
| 10 | + sendFailure: false, |
| 11 | + sendDegraded: false, |
| 12 | + sslExpiry: false, |
| 13 | + template: `{ |
| 14 | + "CHECK_NAME": "{{ CHECK_NAME }}", |
| 15 | + "CHECK_ID": "{{ CHECK_ID }}", |
| 16 | + "CHECK_TYPE": "{{ CHECK_TYPE }}", |
| 17 | + "GROUP_NAME": "{{ GROUP_NAME }}", |
| 18 | + "ALERT_TITLE": "{{ ALERT_TITLE }}", |
| 19 | + "ALERT_TYPE": "{{ ALERT_TYPE }}", |
| 20 | + "CHECK_RESULT_ID": "{{ CHECK_RESULT_ID }}", |
| 21 | + "RESPONSE_TIME": "{{ RESPONSE_TIME }}", |
| 22 | + "API_CHECK_RESPONSE_STATUS_CODE": "{{ API_CHECK_RESPONSE_STATUS_CODE }}", |
| 23 | + "API_CHECK_RESPONSE_STATUS_TEXT": "{{ API_CHECK_RESPONSE_STATUS_TEXT }}", |
| 24 | + "RUN_LOCATION": "{{ RUN_LOCATION }}", |
| 25 | + "RESULT_LINK": "{{ RESULT_LINK }}", |
| 26 | + "SSL_DAYS_REMAINING": "{{ SSL_DAYS_REMAINING }}", |
| 27 | + "SSL_CHECK_DOMAIN": "{{ SSL_CHECK_DOMAIN }}", |
| 28 | + "STARTED_AT": "{{ STARTED_AT }}", |
| 29 | + "TAGS": "{{ TAGS }}", |
| 30 | + "$RANDOM_NUMBER": "{{ $RANDOM_NUMBER }}", |
| 31 | + "$UUID": "{{ $UUID }}", |
| 32 | + "moment": "{{ moment }}" |
| 33 | +}`, |
| 34 | +}) |
3 | 35 |
|
4 | 36 | export default defineConfig({
|
5 | 37 | projectName: 'Website Monitoring',
|
6 | 38 | logicalId: 'website-monitoring-1',
|
7 | 39 | repoUrl: 'https://github.com/acme/website',
|
8 | 40 | checks: {
|
| 41 | + alertChannels: [webhookChannel], |
9 | 42 | activated: true,
|
10 | 43 | muted: false,
|
11 | 44 | runtimeId: '2022.10',
|
12 | 45 | frequency: Frequency.EVERY_5M,
|
13 | 46 | locations: ['us-east-1', 'eu-west-1'],
|
14 |
| - tags: ['website', 'api'], |
| 47 | + tags: ['website', 'api', 'srebot'], |
15 | 48 | checkMatch: '**/__checks__/**/*.check.ts',
|
16 | 49 | ignoreDirectoriesMatch: [],
|
17 | 50 | browserChecks: {
|
|
0 commit comments