Skip to content

Commit

Permalink
remove automatic add to status page + add apdex_t for updown.io
Browse files Browse the repository at this point in the history
  • Loading branch information
unixfox committed May 15, 2024
1 parent c1d870c commit 1b68e26
Showing 1 changed file with 1 addition and 30 deletions.
31 changes: 1 addition & 30 deletions .github/workflows/add-instance-updown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
Expand Down

0 comments on commit 1b68e26

Please sign in to comment.