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:
mamoyal
2025-09-30 13:50:37 +03:00
committed by GitHub
parent f3bbddc287
commit f65aebffb1
75 changed files with 627 additions and 80 deletions

View File

@@ -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) {