Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Compose alert-first drawers without losing reading and access guidance

pulse-triage[bot]a11f031fd135
diff --cc docs/release-control/v6/internal/subsystems/agent-lifecycle.md
index 09c777a1be,ab2624528c..ad836b7095
--- a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
+++ b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
@@@ -15,55 -15,14 +15,63 @@@
## Purpose
+### Unraid/QNAP removal retires exact boot entries and confirms watchdog quiescence
+
+The Unix uninstall caller selects these platforms from their vendor/installed
+footprints, not from an ordinary recovered Linux state directory or QNAP state
+finder alone. Existing exact state-removal authority must select the wrapper's
+state directory. Regular root-owned files and parents are required; FAT boot
+volumes cannot be assumed to implement Unix chmod semantics. Unknown wrapper
+ownership and missing observation tools refuse before mutation.
+
+One complete bounded boot-file parse admits only the exact generated Unraid
+launch or canonical QNAP deferred block/legacy direct launch for that wrapper.
+All duplicates retire; unrelated entries (including co-installed names and
+legacy Telegraf) remain. Foreign/indirect targets, partial or changed blocks,
+linked/non-regular files, binary/incomplete content and over-1-MiB files refuse
+without evaluating or disclosing their text. The original remains in a private
+`.pulse-removal.*` recovery directory outside the active boot namespace through
+remote confirmation. A changed source during staging or a concurrently created
+file, directory or symlink refuses without clobbering it; interrupted staging
+retains the actual original and never restores automatic activation. New boot
+content uses no-clobber file creation, compatible with FAT without hard links;
+this is not an atomic whole-content swap or a lock against external root writers.
+
+Complete bounded kernel evidence returns only numeric IDs and roles. Only exact
+selected watchdog/collector processes receive checked TERM, watchdog first,
+with independent absence observations. Editor sessions, backup wrappers and
+co-installed names are not targets. Relative/foreign same-name processes or
+unattributable QNAP deferred autorun or live Unraid go shells refuse instead
+of signalling another boot owner. A live go shell may already hold later boot
+commands in memory; editing its file cannot establish quiescence. Failed/diagnostic/duplicate/empty reads and ignored/refused signals
+retain identity, credentials, trust and recoverable files. QNAP mount and
+unmount each have checked bounded results, including cleanup after partial mount.
+
+Whole boot/process and applicable init-manager quiescence closes again before
+same-instance server removal and before local erasure; late activation refuses,
+even after remote removal succeeded. NAS paths do not subsequently run the
+unchecked global pkill or delete arbitrary discovered QNAP state/whole legacy
+Unraid directories. Successful/absent/repeated removal still requires complete
+fresh observations. No automatic restart, credential churn or transport-policy
+change follows a partial operation.
+
+`TestInstallSHNASBootOwnersQuiesceBeforeRecoveryErasure` requires all eighteen
+actual-function/full-uninstall caller controls in `agent_nas_teardown.py`. The
+boot filesystem transformations are real private user operations; flash/kernel
+faults are closed models. Two generated watchdog/child controls use real private
+ordinary-user processes, not appliance mounts or root services. Native signed
+Unraid/QNAP/Linux/PowerShell, TLS/identity/repetition/cleanup and containing
+publication remain separate obligations; this source proof does not resolve
+#1099 or claim installed restoration.
+
+ ### Patrol maintenance coverage adds no agent authority
+
+ The Patrol operator-state projection in `internal/api/router.go` now reads the
+ active maintenance occurrence (one-shot or recurring) and inherits ancestor
+ windows scoped `resource_and_descendants`, as alert intent does. It only
+ auto-dismisses new findings; it adds no agent route, command or execution
+ authority, and remediation locks stay exact-resource state.
+
### Pro Patrol default adds no agent authority
The Patrol autonomy handler change only reports whether the Pro Ask first
diff --cc docs/release-control/v6/internal/subsystems/security-privacy.md
index c114f61a7b,8ff01c7161..e1de195800
--- a/docs/release-control/v6/internal/subsystems/security-privacy.md
+++ b/docs/release-control/v6/internal/subsystems/security-privacy.md
@@@ -18,26 -18,13 +18,33 @@@
## Purpose
+### Rejected infrastructure URLs stay out of diagnostics
+
+PVE/PBS constructors validate a host before logging it. URL syntax errors omit
+`url.Parse`'s copy of the supplied input; ordinary validation reasons remain.
+Cluster logs, health snapshots, recovery summaries and aggregate errors use
+display-only labels:
+a valid base URL or `[invalid endpoint]`. Health snapshots preserve each entry
+even when rejected endpoints share that label, and are built only for enabled
+log events. These labels never supply routing,
+alias membership, saved configuration or TLS-pin identity. HTTP/HTTPS defaults,
+base paths, authentication, CA/pin/opt-out choices and guest fences are unchanged.
+
+`TestClientRejectedHostDiagnosticsContainNoCredentials` and
+`TestClusterRejectedEndpointDiagnosticsContainNoCredentials` exercise actual
+constructors, single/multiple endpoint routing and recovery with synthetic
+userinfo/query/fragment and malformed URLs. Accepted-host and
+`TestInfrastructureURLValidationPolicyUnchanged` controls preserve ordinary
+routing and diagnostics. This bounds client diagnostics, not arbitrary provider
+error text, previously saved logs, native trust recovery or an installed service.
+
+ ### Patrol maintenance coverage widens no authority
+
+ Patrol inherits only maintenance from an ancestor window scoped
+ `resource_and_descendants`. Monitoring mode, lifecycle and the
+ `NeverAutoRemediate` lock are never inherited, so descendant scope can quiet
+ findings but cannot unlock or grant automated action on any resource.
+
### Startup provisioning cannot replace retained access
`pkg/server/server.go` admits environment-selected startup import only into an
diff --cc frontend-modern/src/components/Workloads/GuestDrawerOverview.tsx
index 2b9d0a3b3e,af688764de..7fe25e066b
--- a/frontend-modern/src/components/Workloads/GuestDrawerOverview.tsx
+++ b/frontend-modern/src/components/Workloads/GuestDrawerOverview.tsx
@@@ -389,18 -523,54 +523,56 @@@ export function GuestDrawerOverview(pro
/>
</Show>
- <div class="space-y-3">
- <Show when={props.guest.availability || props.guest.availabilityChecks?.length}>
- <div class="mt-3 max-w-sm">
- <div class="space-y-3">
- <AvailabilityProbeStatusCards
- availability={props.guest.availability}
- checks={props.guest.availabilityChecks}
- />
- </div>
+ {/* A failing or unknown check is something to act on, so it stays in
+ front. A passing one is summarised above and kept under Details. */}
+ <Show when={hasAvailability() && !availabilityHealthy()}>
+ <div class="max-w-sm space-y-3">
+ <AvailabilityProbeStatusCards
+ availability={props.guest.availability}
+ checks={props.guest.availabilityChecks}
+ />
+ </div>
+ </Show>
+
+ <Show when={facts().length > 0 || tagChips().length > 0}>
+ <div
+ data-testid="guest-drawer-facts"
+ class="flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-muted"
+ >
- <For each={facts()}>{(fact) => <span class="wrap-break-word">{fact}</span>}</For>
++ <For each={facts()}>
++ {(fact) => <span class="max-w-full whitespace-normal wrap-anywhere">{fact}</span>}
++ </For>
+ <For each={tagChips()}>
+ {(tag) => (
+ <span class="max-w-full rounded-full border border-border px-2 py-0.5 text-[11px] break-all">
+ {tag}
+ </span>
+ )}
+ </For>
+ </div>
+ </Show>
+
+ <TechnicalDetailsDisclosure
+ dataTestId="guest-technical-details"
+ title="Details"
+ keepMounted
+ subtitle="system, coverage, memory, network and availability checks"
+ class="border-t border-border pt-2"
+ contentClass="mt-2 space-y-3"
+ >
+ <TechnicalDetailsSection
+ dataTestId="guest-technical-details-sections"
+ sections={sectionsByLabel().details}
+ />
+ <Show when={availabilityHealthy()}>
+ <div class="max-w-sm space-y-3">
+ <AvailabilityProbeStatusCards
+ availability={props.guest.availability}
+ checks={props.guest.availabilityChecks}
+ />
</div>
</Show>
- </div>
+ </TechnicalDetailsDisclosure>
</div>
);
}
diff --cc frontend-modern/src/components/Workloads/NodeDrawerOverview.tsx
index 8971dce852,57467f8f0c..f02ca3e3b4
--- a/frontend-modern/src/components/Workloads/NodeDrawerOverview.tsx
+++ b/frontend-modern/src/components/Workloads/NodeDrawerOverview.tsx
@@@ -1,7 -1,12 +1,13 @@@
- import { Show } from 'solid-js';
- import { useRelativeTimeNow } from '@/utils/relativeTimeClock';
+ import { For, Show, Suspense, createMemo, lazy } from 'solid-js';
+
+import { HelpIcon } from '@/components/shared/HelpIcon';
- import { TechnicalDetailsSection } from '@/components/shared/TechnicalDetailsDisclosure';
+ import { ALERTS_EMPTY_STATE } from '@/utils/alertOverviewPresentation';
+ import { useRelativeTimeNow } from '@/utils/relativeTimeClock';
+ import {
+ TechnicalDetailsDisclosure,
+ TechnicalDetailsSection,
+ } from '@/components/shared/TechnicalDetailsDisclosure';
+ import { HOST_METRICS_HISTORY_GROUPS } from '@/components/shared/hostMetricsHistoryModel';
import { DrawerAttentionSection } from '@/components/shared/DrawerAttentionSection';
import {
compactDetailRows,
@@@ -336,63 -389,157 +385,176 @@@ export function NodeDrawerOverview(prop
},
]);
+ const updateAccessGuidance = (
+ <Show when={updateEvidence()?.helpContentId}>
+ <div class="space-y-1 text-left text-[11px] font-normal text-muted">
+ <p class="whitespace-normal wrap-anywhere">
+ Update checks use separate Proxmox access. Other monitoring can still work.
+ </p>
+ <HelpIcon
+ contentId="updates.proxmox.access"
+ triggerLabel="Why update checks are unavailable"
+ size="xs"
+ class="-ml-2"
+ />
+ </div>
+ </Show>
+ );
+
- // Keep the interactive guidance owned by the drawer, rather than rebuilding
- // its section and help state whenever node readings or relative ages change.
- const operatorContextSection: DetailSection = {
- label: 'Operator context',
- get rows() {
- const primaryTemperature = getCpuTemperature(props.node.temperature);
- const updates = updateEvidence();
- const temperatureClass =
- typeof primaryTemperature === 'number'
- ? getTemperatureTextClass(primaryTemperature, props.temperatureThresholds)
- : '';
- return compactDetailRows([
- makeDetailRow('Platform', versionLabel() ? `PVE ${versionLabel()}` : null),
- makeDetailRow(
- 'Pulse coverage',
- linkedAgentId() ? `Agent ${stripAgentPrefix(linkedAgentId())}` : 'PVE API only',
- ),
- updates
- ? makeDetailRow('Updates', updates.value, {
- tone: updates.tone,
- title: updates.title,
- wrap: true,
- })
- : null,
- typeof primaryTemperature === 'number' &&
- (temperatureClass.includes('yellow') || temperatureClass.includes('red'))
- ? makeDetailRow('Temperature', formatTemperature(primaryTemperature), {
- tone: temperatureClass.includes('red') ? 'danger' : 'warning',
- })
- : null,
- ]);
- },
- get footerContent() {
- return updateEvidence()?.helpContentId ? updateAccessGuidance : undefined;
- },
++ // Inventory may move into Details, but denied-update guidance stays visible
++ // and owned by the drawer so readings do not recreate an open help dialog.
+ const overviewSections = () => {
+ const primaryTemperature = getCpuTemperature(props.node.temperature);
+ const updates = updateEvidence();
+ const temperatureClass =
+ typeof primaryTemperature === 'number'
+ ? getTemperatureTextClass(primaryTemperature, props.temperatureThresholds)
+ : '';
+ return compactDetailSections([
+ {
+ label: 'Summary',
+ rows: compactDetailRows([
+ makeDetailRow('Platform', versionLabel() ? `PVE ${versionLabel()}` : null),
+ makeDetailRow(
+ 'Pulse coverage',
+ linkedAgentId() ? `Agent ${stripAgentPrefix(linkedAgentId())}` : 'PVE API only',
+ ),
+ updates
+ ? makeDetailRow('Updates', updates.value, {
+ tone: updates.tone,
+ title: updates.title,
++ wrap: true,
+ })
+ : null,
+ typeof primaryTemperature === 'number' &&
+ (temperatureClass.includes('yellow') || temperatureClass.includes('red'))
+ ? makeDetailRow('Temperature', formatTemperature(primaryTemperature), {
+ tone: temperatureClass.includes('red') ? 'danger' : 'warning',
+ })
+ : null,
+ ]),
+ },
+ ]);
+ };
+
+ const exceptionRows = createMemo(() =>
+ collectDrawerExceptionRows([...overviewSections(), ...technicalSections()]),
+ );
+
+ // The table withholds readings from an offline or stale node; the trend
+ // cards do the same instead of presenting the last numbers as live.
+ const liveReadingsWithheld = (): string | null => {
+ const health = (props.node.connectionHealth || '').trim().toLowerCase();
+ if (props.node.status === 'offline') return 'Node is offline. Showing its history only.';
+ if (
+ props.node.status === 'unknown' ||
+ health === 'error' ||
+ health === 'degraded' ||
+ health === 'stale'
+ ) {
+ return 'Proxmox readings for this node are stale. Showing its history only.';
+ }
+ return null;
+ };
+
+ const trendCards = (): DrawerTrendCardConfig[] => {
+ const card = (
+ metric: string,
+ label: string,
+ unit: DrawerTrendCardConfig['unit'],
+ current: number | undefined,
+ detail?: string,
+ deferred?: GuestDrawerHistoryDeferredMetric,
+ ): DrawerTrendCardConfig => {
+ const alert = getDrawerMetricAlert(props.metricAlerts, metric);
+ const withheld = liveReadingsWithheld();
+ return {
+ metric,
+ label,
+ unit,
+ color: hostSeriesColor(metric),
+ current: withheld ? undefined : current,
+ deferred: withheld ? { message: withheld } : deferred,
+ detail: withheld ? undefined : detail,
+ alertSeverity: alert?.severity,
+ alertThreshold: alert?.threshold,
+ };
+ };
+ const memory = props.node.memory;
+ const disk = props.node.disk;
+ // The adapter fills missing usage with zero; a known total is the
+ // evidence that a percentage was measured at all.
+ const memoryValue =
+ memory?.usageUnavailable || !((memory?.total ?? 0) > 0)
+ ? undefined
+ : finitePercent(memory?.usage);
+ // A retained or undated reading is shown as last known, the same rule the
+ // guest cards follow, rather than as a live value.
+ const memoryReading = getMemoryObservationPresentation(memoryValue, memory?.observation);
+ const memoryDeferred: GuestDrawerHistoryDeferredMetric | undefined =
+ memoryReading && memoryReading.state !== 'current'
+ ? {
+ lastKnownValue: memoryReading.state === 'unavailable' ? undefined : memoryValue,
+ ...(memoryReading.state === 'unknown'
+ ? { valueLabel: 'freshness unknown' as const }
+ : {}),
+ message: memoryReading.message,
+ }
+ : undefined;
+ const memoryCurrent = memoryDeferred ? undefined : memoryValue;
+ const diskMeasured = (disk?.total ?? 0) > 0;
+ const temperature = getCpuTemperature(props.node.temperature);
+ return [
+ card(
+ 'cpu',
+ 'CPU',
+ '%',
+ finitePercent(props.node.cpu),
+ loadAverageLabel() !== '-' ? `load ${props.node.loadAverage?.[0]?.toFixed(2)}` : undefined,
+ ),
+ card(
+ 'memory',
+ 'Memory',
+ '%',
+ memoryCurrent,
+ (memoryCurrent ?? memoryDeferred?.lastKnownValue) !== undefined
+ ? `${formatBytes(memory.used ?? 0)} of ${formatBytes(memory.total)}`
+ : undefined,
+ memoryDeferred,
+ ),
+ ...(typeof temperature === 'number'
+ ? [card('temperature', 'CPU temperature', 'C', temperature)]
+ : []),
+ card(
+ 'disk',
+ 'Root disk',
+ '%',
+ diskMeasured ? finitePercent(disk?.usage) : undefined,
+ diskMeasured
+ ? `${formatBytes(disk?.used ?? 0)} of ${formatBytes(disk?.total ?? 0)}`
+ : undefined,
+ ),
+ ];
};
- const overviewSections = () => [operatorContextSection];
+ const facts = () => {
+ const model = cleanText(props.node.cpuInfo?.model);
+ const cores = props.node.cpuInfo?.cores;
+ const firstAddress = (props.node.networkInterfaces || [])
+ .flatMap((networkInterface) => networkInterface.addresses || [])
+ .map((address) => cleanText(address))
+ .find(Boolean);
+ return [
+ versionLabel() ? `Proxmox VE ${versionLabel()}` : '',
+ [model, hasPositiveNumber(cores) ? `${cores} logical CPUs` : ''].filter(Boolean).join(' · '),
+ (props.node.memory?.total ?? 0) > 0 ? `${formatBytes(props.node.memory.total)} RAM` : '',
+ firstAddress ?? '',
+ clusterLabel() && clusterLabel() !== 'Standalone' ? `Cluster ${clusterLabel()}` : '',
+ ].filter((fact) => fact.trim().length > 0);
+ };
return (
- <div class="space-y-3">
+ <div class="space-y-3" data-testid="node-drawer-overview">
<DrawerAttentionSection
items={(props.alerts ?? []).map((alert) => ({
id: alert.id,
@@@ -407,9 -554,50 +569,52 @@@
acknowledged: alert.acknowledged,
}))}
/>
- <TechnicalDetailsSection
+ <Show when={(props.alerts ?? []).length === 0}>
+ <p data-testid="drawer-no-attention" class="text-xs font-medium text-base-content">
+ {ALERTS_EMPTY_STATE}
+ </p>
+ </Show>
+
+ <Show when={props.historyTarget}>
+ <Suspense fallback={<div class="h-28" aria-hidden="true" />}>
+ <DrawerTrendCards
+ target={props.historyTarget ?? null}
+ enabled={props.trendsEnabled ?? true}
+ cards={trendCards()}
+ />
+ </Suspense>
+ </Show>
+
+ <Show when={exceptionRows().length > 0}>
+ <TechnicalDetailsSection
+ dataTestId="node-drawer-exceptions"
+ sections={[{ label: 'Worth checking', rows: exceptionRows() }]}
+ />
+ </Show>
+
++ {updateAccessGuidance}
++
+ <Show when={sensorSections().length > 0}>
+ <TechnicalDetailsSection dataTestId="node-drawer-sensors" sections={sensorSections()} />
+ </Show>
+
+ <Show when={facts().length > 0}>
+ <div
+ data-testid="node-drawer-facts"
+ class="flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-muted"
+ >
+ <For each={facts()}>{(fact) => <span class="wrap-break-word">{fact}</span>}</For>
+ </div>
+ </Show>
+
+ <TechnicalDetailsDisclosure
dataTestId="node-technical-details"
- sections={[...overviewSections(), ...technicalSections()]}
+ title="Details"
+ keepMounted
+ subtitle="platform, hardware, memory, network, storage and sensors"
+ class="border-t border-border pt-2"
+ contentClass="mt-2"
+ sections={withoutDrawerExceptionRows([...overviewSections(), ...technicalSections()])}
/>
</div>
);