Skip to content

io.systemd.Report

Frontend API for generating system reports. This interface is implemented by systemd-report, which aggregates the metrics exposed by the io.systemd.Metrics services linked into /run/systemd/report/.

Property Value
Go package github.com/rossedman/sdvarlink/systemd/latest/report
Socket /run/systemd/io.systemd.Report
Available since systemd v262
Methods · types · errors 2 · 1 · 0

Methods

Generate

Generate a report and return it as a JSON object.

func (c *Client) Generate(ctx context.Context, in GenerateIn) (*GenerateOut, error)

Parameters

Field Type Description
matches ?[]string Selects which metrics to include in the report, as an array of metric family names or prefixes thereof. If unset or empty all available metrics are included. This matches the [MATCH…] arguments of the systemd-report command line tool.

Reply

Field Type Description
report object The generated report as a JSON object. This mode does not sign the report, hence a precise binary formatting of the JSON data is not relevant.

GenerateSigned

Generate a signed report and return it Base64 encoded.

func (c *Client) GenerateSigned(ctx context.Context, in GenerateSignedIn) (*GenerateSignedOut, error)

Parameters

Field Type Description
matches ?[]string Selects which metrics to include in the report, as an array of metric family names or prefixes thereof. If unset or empty all available metrics are included. This matches the [MATCH…] arguments of the systemd-report command line tool.
mode ?SignMode How to handle multiple signers. Defaults to requireOne if unset.

Reply

Field Type Description
reportData string The generated, signed report in Base64. A precise binary formatting of the JSON data is important to authenticate the signature. This data contains a JSON-SEQ compliant stream of objects, the first being the report, the following ones signature objects.

Types

SignMode

Policy for how multiple signers are aggregated.

Value Description
bestEffort Emit whatever signatures are available, never fail on signing.
requireOne Require at least one signature; tolerate individual signer failures. (Default.)
requireAll Require every signing mechanism to succeed with a signature.