Fact Definitions List¶
The Muppy / Tasks / Fact Definitions menu gives access to all the Facts collected by Muppy.
The Fact Definitions list lets you access the details of the Fact Definitions, verify that they are correctly analyzed, and decide which ones the collection of all facts runs (see Collecting all facts below).
To write a Fact Collector, see Writing a Fact Collector.
The Fact Definitions form view gives access to:
- The Fact Definition information.
- The Facts dependency schema.
Info
The dependency relationships let you define the collection order of the Facts. If a Fact Definition A depends on a Fact Definition B, then B will be collected before A. And the Fact Collector Task of A will be able to use B.
Collecting all facts¶
Update Facts on a Host form runs the collection of all facts of that Host. The scheduled action Muppy: Collect all Facts for all Hosts runs it on every Host, one job per Host. Each job runs the Fact Collectors of the Host's Fact Definitions, in dependency order, except those the fields below set aside.
Three fields of a Fact Definition change what this collection does:
- Excluded from Collect All — set by you on the Fact Definition form, unchecked by default. The collection skips the Fact Definition, unless another collected Fact depends on it. A Task Run still runs its Fact Collector. Updating Muppy keeps your choice.
- Runs in its own message — set by Muppy, read-only. The collection queues the Fact Collector in a job of its own. A slow or failing collector then neither delays nor stops the other facts. While that job is queued or running, a new request for the same Fact and Host joins it.
- Declared only — set by Muppy, read-only. The Fact Definition exists for a Fact that another Task writes, or that is reserved for one, and its Fact Collector does nothing. The collection does not run it, so it makes no Task call and no connection for it. The Facts it depends on are still collected, and the Facts that depend on it keep their order. Updating Muppy sets it again from the code of the Fact Collector.
The list has a filter for each field.
Info
HOST_USAGE runs in its own message: it samples its Host for about ten seconds. It photographs only the Hosts that have an LXD allocator, a Default Reverse Proxy and a Default PostgreSQL Cluster, and the nodes of the microk8s clusters, and does nothing on the others. On a microk8s node it also writes MICROK8S_USAGE and MICROK8S_KUBELET_CONFIG. To photograph another Host, launch a Task Run of collect_host_usage with force_scan checked.


