What is normal for the time: baselines per hour of the week
Each server's CPU load and memory use get a baseline for every hour of the week (median and robust spread over up to ten weeks, four needed). A clearly high last hour that never dropped back toward normal is a warning; everything else stays quiet. Server History -> Trends draws a usual line and band. Setting under Notifications, on by default. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
232a5661ab
commit
31044b2b64
17 files changed
+619
-10
No files matched your search
@@ -301,6 +301,22 @@ export interface ServerActivityEvent {
|
||||
actor: string | null;
|
||||
}
|
||||
|
||||
/** What is normal for one hour of the week: the median of that hour's averages over past weeks, a robust spread, and how many weeks it stands on. */
|
||||
export interface BaselineSlot {
|
||||
dow: number;
|
||||
hour: number;
|
||||
median: number;
|
||||
spread: number;
|
||||
weeks: number;
|
||||
}
|
||||
|
||||
/** What is normal for a server at each hour of the week (Sunday 00:00 first), in the notification time zone; null where there are not enough weeks yet. */
|
||||
export interface BaselineView {
|
||||
timezone: string;
|
||||
now: { dow: number; hour: number };
|
||||
slots: { cpu: (BaselineSlot | null)[]; mem: (BaselineSlot | null)[] };
|
||||
}
|
||||
|
||||
export interface ServerMetricSeries {
|
||||
metric: string;
|
||||
kind: "cpu" | "mem" | "disk";
|
||||
@@ -519,6 +535,8 @@ export interface HealthCheckSettings {
|
||||
deviceOfflineMinutes: number;
|
||||
/** Days before an operating system's support ends that a server is flagged (0 = off). */
|
||||
osSupportWarnDays: number;
|
||||
/** A server whose CPU or memory over the last hour is clearly higher than is normal for this hour of the week is a warning. */
|
||||
baselineAlerts: boolean;
|
||||
}
|
||||
|
||||
/** The monthly report: last month's availability, incidents, updates and renewals, in one message on a day of the month. */
|
||||
@@ -2908,6 +2926,7 @@ export const api = {
|
||||
detail: (id: number) => request<ServerDetail>(`/api/servers/${id}/detail`),
|
||||
activity: (id: number) => request<{ events: ServerActivityEvent[] }>(`/api/servers/${id}/activity`),
|
||||
metrics: (id: number, days: number) => request<{ days: number; series: ServerMetricSeries[] }>(`/api/servers/${id}/metrics?days=${days}`),
|
||||
baseline: (id: number) => request<BaselineView>(`/api/servers/${id}/baseline`),
|
||||
remove: (id: number) => request<void>(`/api/servers/${id}`, { method: "DELETE" }),
|
||||
setTags: (id: number, tags: string[]) =>
|
||||
request<{ tags: string[] }>(`/api/servers/${id}/tags`, { method: "PUT", body: JSON.stringify({ tags }) }),
|
||||
|
||||
Reference in new issue
Block a user