mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-23 23:04:04 +00:00
[Alerta] Handle general message
This commit is contained in:
parent
c52c8a4206
commit
fa490d0bf1
1 changed files with 8 additions and 7 deletions
|
@ -30,13 +30,14 @@ class Alerta extends NotificationProvider {
|
|||
};
|
||||
|
||||
if (heartbeatJSON == null) {
|
||||
let testdata = Object.assign( {
|
||||
event: "test",
|
||||
text: "Testing Successful.",
|
||||
group: "uptimekuma-test",
|
||||
resource: "Test",
|
||||
}, data );
|
||||
await axios.post(alertaUrl, testdata, config);
|
||||
let postData = Object.assign({
|
||||
event: "msg",
|
||||
text: msg,
|
||||
group: "uptimekuma-msg",
|
||||
resource: "Message",
|
||||
}, data);
|
||||
|
||||
await axios.post(alertaUrl, postData, config);
|
||||
} else {
|
||||
let datadup = Object.assign( {
|
||||
correlate: ["service_up", "service_down"],
|
||||
|
|
Loading…
Reference in a new issue