mirror of
https://github.com/henrygd/beszel.git
synced 2026-09-21 17:07:47 +02:00
feat(alerts): add alert for failed systemd services (#2173)
Adds a user-configurable "Failed Services" alert that notifies when any tracked systemd service enters the failed state, and again when all services recover. --------- Signed-off-by: Martin Stenröse <martin@stenrose.se> Co-authored-by: henrygd <hank@henrygd.me>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { t } from "@lingui/core/macro"
|
||||
import { CpuIcon, HardDriveIcon, MemoryStickIcon, ServerIcon } from "lucide-react"
|
||||
import { CpuIcon, HardDriveIcon, MemoryStickIcon, ServerCrashIcon, ServerIcon } from "lucide-react"
|
||||
import type { RecordSubscription } from "pocketbase"
|
||||
import { EthernetIcon, GpuIcon } from "@/components/ui/icons"
|
||||
import { $alerts } from "@/lib/stores"
|
||||
@@ -104,6 +104,15 @@ export const alertInfo: Record<string, AlertInfo> = {
|
||||
start: 20,
|
||||
invert: true,
|
||||
},
|
||||
SystemdFailed: {
|
||||
name: () => t`Failed Services`,
|
||||
unit: "",
|
||||
icon: ServerCrashIcon,
|
||||
desc: () => t`Triggers when any systemd service enters the failed state`,
|
||||
triggeredDesc: () => t`One or more services are in the failed state`,
|
||||
/** Fires on first observation - the agent only polls systemd every 10 minutes */
|
||||
noDuration: true,
|
||||
},
|
||||
} as const
|
||||
|
||||
/** Helper to manage user alerts */
|
||||
|
||||
Reference in New Issue
Block a user