mirror of
https://github.com/iv-org/documentation.git
synced 2024-11-26 23:50:37 +00:00
remove automatic add to status page + add apdex_t for updown.io
This commit is contained in:
parent
c1d870cb15
commit
1b68e2610f
31
.github/workflows/add-instance-updown.yml
vendored
31
.github/workflows/add-instance-updown.yml
vendored
@ -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.',
|
||||
|
Loading…
Reference in New Issue
Block a user