From 1b68e2610fb4ba9ccb2df3a2e493818cdeb443c2 Mon Sep 17 00:00:00 2001 From: Emilien Devos <4016501+unixfox@users.noreply.github.com> Date: Wed, 15 May 2024 13:51:56 +0200 Subject: [PATCH] remove automatic add to status page + add apdex_t for updown.io --- .github/workflows/add-instance-updown.yml | 31 +---------------------- 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/.github/workflows/add-instance-updown.yml b/.github/workflows/add-instance-updown.yml index d1f5548..95f59db 100644 --- a/.github/workflows/add-instance-updown.yml +++ b/.github/workflows/add-instance-updown.yml @@ -62,43 +62,14 @@ jobs: period: '300', mute_until: 'forever', published: 'true', + apdex_t: '1.0', alias: instanceHostname, string_match: 'An alternative front-end to YouTube' } }; request(optionsAddNewCheck, async function (error, response, body) { if (error) throw new Error(error); - console.log(body); if (body.token) { - var optionsGetStatusPages = { - method: 'GET', - url: 'https://updown.io/api/status_pages?api-key=${{ secrets.UPDOWN_API_KEY }}', - json: true - }; - - request(optionsGetStatusPages, async function (error, response, body) { - if (error) throw new Error(error); - const statusPage = body.filter(element => element.token === "resvf"); - let checksOfStatusPage = statusPage[0].checks; - - checksOfStatusPage.push(body.token) - - var optionsAddCheckToStatusPage = { - method: 'PUT', - url: 'https://updown.io/api/status_pages/resvf?api-key=${{ secrets.UPDOWN_API_KEY }}', - headers: { - 'content-type': 'application/json' - }, - json: {checks: checksOfStatusPage} - }; - - request(optionsAddCheckToStatusPage, async function (error, response, body) { - if (error) throw new Error(error); - - console.log(body) - }); - }); - var replyComment = ['Hello! Your instance has been added to our monitoring system: https://updown.io/' + body.token, 'You need to wait 30 days before we add your instance, this is to evaluate that your instance will keep a good uptime for one month.',