mirror of
https://github.com/fosrl/pangolin.git
synced 2026-06-15 20:07:35 +00:00
Working on alerting
This commit is contained in:
@@ -32,7 +32,7 @@ import { processAlerts } from "../processAlerts";
|
||||
export async function fireHealthCheckHealthyAlert(
|
||||
orgId: string,
|
||||
healthCheckId: number,
|
||||
healthCheckName?: string,
|
||||
healthCheckName?: string | null,
|
||||
extra?: Record<string, unknown>
|
||||
): Promise<void> {
|
||||
try {
|
||||
@@ -68,7 +68,7 @@ export async function fireHealthCheckHealthyAlert(
|
||||
export async function fireHealthCheckNotHealthyAlert(
|
||||
orgId: string,
|
||||
healthCheckId: number,
|
||||
healthCheckName?: string,
|
||||
healthCheckName?: string | null,
|
||||
extra?: Record<string, unknown>
|
||||
): Promise<void> {
|
||||
try {
|
||||
@@ -88,4 +88,4 @@ export async function fireHealthCheckNotHealthyAlert(
|
||||
err
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -212,6 +212,7 @@ export async function buildTargetConfigurationForNewtClient(siteId: number) {
|
||||
hcUnhealthyInterval: targetHealthCheck.hcUnhealthyInterval,
|
||||
hcTimeout: targetHealthCheck.hcTimeout,
|
||||
hcHeaders: targetHealthCheck.hcHeaders,
|
||||
hcFollowRedirects: targetHealthCheck.hcFollowRedirects,
|
||||
hcMethod: targetHealthCheck.hcMethod,
|
||||
hcTlsServerName: targetHealthCheck.hcTlsServerName,
|
||||
hcStatus: targetHealthCheck.hcStatus,
|
||||
@@ -284,6 +285,7 @@ export async function buildTargetConfigurationForNewtClient(siteId: number) {
|
||||
hcUnhealthyInterval: target.hcUnhealthyInterval, // in seconds
|
||||
hcTimeout: target.hcTimeout, // in seconds
|
||||
hcHeaders: hcHeadersSend,
|
||||
hcFollowRedirects: target.hcFollowRedirects,
|
||||
hcMethod: target.hcMethod,
|
||||
hcTlsServerName: target.hcTlsServerName,
|
||||
hcStatus: target.hcStatus,
|
||||
|
||||
@@ -95,6 +95,7 @@ export async function addTargets(
|
||||
hcUnhealthyInterval: hc.hcUnhealthyInterval, // in seconds
|
||||
hcTimeout: hc.hcTimeout, // in seconds
|
||||
hcHeaders: hcHeadersSend,
|
||||
hcFollowRedirects: hc.hcFollowRedirects,
|
||||
hcMethod: hc.hcMethod,
|
||||
hcStatus: hcStatus,
|
||||
hcTlsServerName: hc.hcTlsServerName,
|
||||
|
||||
@@ -25,6 +25,7 @@ interface TargetHealthStatus {
|
||||
hcUnhealthyInterval?: number;
|
||||
hcTimeout?: number;
|
||||
hcHeaders?: any;
|
||||
hcFollowRedirects?: boolean;
|
||||
hcMethod?: string;
|
||||
hcTlsServerName?: string;
|
||||
hcHealthyThreshold?: number;
|
||||
|
||||
Reference in New Issue
Block a user