Working on alerting

This commit is contained in:
Owen
2026-04-16 11:49:48 -07:00
parent 1a1d1cfb83
commit 57579e635c
11 changed files with 572 additions and 1255 deletions

View File

@@ -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
);
}
}
}

View File

@@ -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,

View File

@@ -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,

View File

@@ -25,6 +25,7 @@ interface TargetHealthStatus {
hcUnhealthyInterval?: number;
hcTimeout?: number;
hcHeaders?: any;
hcFollowRedirects?: boolean;
hcMethod?: string;
hcTlsServerName?: string;
hcHealthyThreshold?: number;