Machine Reports
Each machine running the Livepatch Client will periodically check in with its configured server.
The machine checks for patches and sends machine status information. The full list of information sent is documented here.
This how-to illustrates how to enable machine reporting on your on-prem server to enable an administrator of the server to query for information on machines.
Enabling Machine Reports
Understanding Config
Below each config value for machine reports is explained. Each deployment method for the Livepatch server has a slightly different key for setting these config values.
- Enabled: Controls whether the storing of machine reports is enabled.
- Retention days: The number of days to store machine reports.
- Cleanup row limit: The maximum number of rows to cleanup at a time.
- Cleanup interval: How frequently to perform report cleanup.
(Old) Reactive Charm
The Livepatch reactive charm uses the legacy Juju reactive framework. Opt for the newer Operator based charms where possible.
The reactive charm can be identified when running the canonical-livepatch-server charm from channel latest/*
.
The reactive charm enables machine reporting by default and does not offer a config option to disable it.
juju config livepatch \
report_retention=30 \
report_cleanup_row_limit=1000 \
report_cleanup_interval="6h"
Operator Charms
The Livepatch operator charms are more modern variants of Juju charms.
Identify the operator Livepatch charm when running the canonical-livepatch-server by the use of the ops1.x/*
channel.
The canonical-livepatch-server-k8s charm is only an operator charm.
juju config livepatch \
machine-reports.database.enabled=true
machine-reports.database.retention-days=30 \
machine-reports.database.cleanup-row-limit=1000 \
machine-reports.database.cleanup-interval="6h"
Snap
sudo snap set canonical-livepatch-server \
lp.machine-reports.database.enabled=true \
lp.machine-reports.database.retention-days=30 \
lp.machine-reports.database.cleanup-row-limit=1000 \
lp.machine-reports.database.cleanup-interval="6h"
Generating Machine Reports
To generate machine reports use the Livepatch admin tool.
See our how-to on setting up the admin tool.
You can create machine reports where you query machines by their tier, last applied patch version or patch state.
livepatch-admin report machines <tier> [<patch version> [<patch state]]