pub struct CheckHint {
pub name: String,
pub status_field: String,
pub detail_field: String,
pub troubleshoot: Option<String>,
pub fleet: bool,
}Expand description
Manifest sub-section (#290): marks a job as an operator-defined
health check. Parallel to InventoryHint / EmitConfig.
The stdout contract is a free-form JSON object (same as any
inventory job) from which the agent reads status_field /
detail_field to build the KLP crate::ipc::state::Check shown
on the Client App’s Health tab.
There is deliberately no timing field — when / how often /
in which window a check runs is driven by the job’s Schedule,
exactly like inventory jobs, so operators get the full when: /
rollout / runs_on expressiveness for free.
A check’s stdout is a free-form inventory object (arbitrary
key/value pairs + arrays) — same as any inventory job — that also
carries a status field. check: adds only the health semantics on
top: which field is the ok/warn/fail/unknown status, an optional
one-line summary field, and a remediation job. Everything else
(rich per-PC detail, explode sub-tables like a software list) is
driven by a co-present InventoryHint and rendered with the
SAME display logic the SPA Inventory page uses — on the Client App
too. This keeps checks maximally expressive without a bespoke
payload type.
Fields§
§name: StringStable check id → Check.name,
the SPA/Client React key + analytics label. Unique within the
fleet’s check set.
status_field: StringTop-level stdout field whose string value
(ok/warn/fail/unknown) becomes the Health-tab light
(CheckStatus). Defaults to
"status"; a missing / unparseable value → unknown.
detail_field: StringTop-level stdout field used as the Health-tab row’s one-line
summary. Defaults to "detail"; absent in the payload → no
detail line (the rich breakdown lives in the inventory view).
troubleshoot: Option<String>Optional remediation job id →
Check.troubleshoot. The Client
App shows a “修復する” button when present; that job must be
user_invokable.
fleet: bool#290 PR-E: when true (default), the backend also projects this
check’s status / detail into the check_status table so the
operator SPA gets a fleet-wide compliance view for free — no
inventory: block needed. Set fleet: false for a client-only
check the operator doesn’t want surfaced across the fleet.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CheckHint
impl<'de> Deserialize<'de> for CheckHint
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for CheckHint
impl JsonSchema for CheckHint
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more