mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-10-04 22:49:21 +08:00
feature: Add an option to enable Telegram to work behind a proxy. (#6125)
Co-authored-by: Frank Elsinga <frank@elsinga.de>
This commit is contained in:
@@ -16,13 +16,14 @@ class GrafanaOncall extends NotificationProvider {
|
||||
}
|
||||
|
||||
try {
|
||||
let config = this.getAxiosConfigWithProxy({});
|
||||
if (heartbeatJSON === null) {
|
||||
let grafanaupdata = {
|
||||
title: "General notification",
|
||||
message: msg,
|
||||
state: "alerting",
|
||||
};
|
||||
await axios.post(notification.GrafanaOncallURL, grafanaupdata);
|
||||
await axios.post(notification.GrafanaOncallURL, grafanaupdata, config);
|
||||
return okMsg;
|
||||
} else if (heartbeatJSON["status"] === DOWN) {
|
||||
let grafanadowndata = {
|
||||
@@ -30,7 +31,7 @@ class GrafanaOncall extends NotificationProvider {
|
||||
message: heartbeatJSON["msg"],
|
||||
state: "alerting",
|
||||
};
|
||||
await axios.post(notification.GrafanaOncallURL, grafanadowndata);
|
||||
await axios.post(notification.GrafanaOncallURL, grafanadowndata, config);
|
||||
return okMsg;
|
||||
} else if (heartbeatJSON["status"] === UP) {
|
||||
let grafanaupdata = {
|
||||
@@ -38,7 +39,7 @@ class GrafanaOncall extends NotificationProvider {
|
||||
message: heartbeatJSON["msg"],
|
||||
state: "ok",
|
||||
};
|
||||
await axios.post(notification.GrafanaOncallURL, grafanaupdata);
|
||||
await axios.post(notification.GrafanaOncallURL, grafanaupdata, config);
|
||||
return okMsg;
|
||||
}
|
||||
} catch (error) {
|
||||
|
Reference in New Issue
Block a user