Commit Graph
14 Commits
Author SHA1 Message Date
Lennart Poettering 3c2f7c6002 report: add support for optionally signing reports
These signatures can be provided by arbitrary Varlink backends symlinked
into /run/systemd/report/sign.

Also add a proper Varlink IDL for the upload interface, since we are
extended it now.
2026-06-19 05:23:18 +02:00
Lennart Poettering de4611efc2 report: rename varlink dir for upload plugins
let's name the dir "/run/systemd/report.upload/" (rather than
"/run/systemd/metrics-upload/"). After all, these are reports that we
upload, not indiviudual metrics. And it would be particular confusing
since the dir to pick up metrics is called /run/systemd/report/, rather
than /run/systemd/metrics/. Hence the thing that deals with reports is
nmamed metrics, and the thing that deals in metrics is named reports...
2026-06-15 20:54:37 +02:00
Lennart Poettering b144bdaf0c report: place Upload() on io.systemd.Report.Uploader rather than io.systemd.Report interface
We really want to use io.systemd.Report for the interface
provided by systemd-report itself, not by its backend. hence, rename the
interface that uploading plugins shall implement to
io.systemd.Report.Uploader.

Note that we ideally should have a varlink interface definition for that
interface. if we had, we'd have noticed that earlier.
2026-06-15 20:53:36 +02:00
Zbigniew Jędrzejewski-Szmek a2186070b7 report: upload reports using a "varlink socket directory"
Two new verbs are added: "generate" and "upload". The first one just
creates a "report", i.e. puts the metrics into a structured JSON object
that in the future is intended to carry additional data like a
signature:

$ build/systemd-report generate io.systemd.Manager.UnitsTotal
{
	"mediaType" : "application/vnd.io.systemd.report",
	"timestamp" : "Tue 2026-04-28 22:30:09 UTC",
	"metrics" : [
		{
			"name" : "io.systemd.Manager.UnitsTotal",
			"value" : 520
		}
	]
}

The second verb can be used to upload or otherwise process the report.
It builds on the code added in 0a8560eed8.
In /run/systemd/metrics-upload/ we expect a set of sockets. We'll call
out to each one of them. This allows the data to be processed in custom
ways, incl. writing to storage or sending over the network.

Each socket must provide a single interface:
  io.systemd.Metrics.Upload {"report":$data}
2026-05-05 18:12:35 +02:00
Zbigniew Jędrzejewski-Szmek d508bfb51d man/systemd-report: document --url= and other options
5bbbe210a4 added the options but not the
documentation.
2026-05-05 17:11:39 +02:00
Zbigniew Jędrzejewski-Szmek e5687f689f report: absorb "facts" into "metrics"
This gets rid of the duality in the cmdline interface and various
APIs. The general plan is collect both "facts" and "metrics" in a
single list. We have various producers which respond on the
io.systemd.Facts endpoint. Those will need to be adjusted to respond
to io.systemd.Metrics.

Cmdline interface:
  'metrics' (unchanged)
  'describe-metrics' → 'describe'
  'facts' → merged into 'metrics'
  'describe-facts' → merged into 'describe'
2026-04-30 11:37:58 +02:00
Yu Watanabe e17ef43f9d man/report: fix typo
Follow-up for e83cbc9372.
2026-02-21 03:00:51 +09:00
Lennart Poettering bbb151da78 report: add --no-legend
Like most of our other tools, add a --no-legend switch.
2026-02-20 08:25:12 +01:00
Lennart Poettering e83cbc9372 report: implement filtering for metrics 2026-02-20 08:25:12 +01:00
Lennart Poettering 442040e716 report: add -j shortcut
json output is going to be used very frequently, hence provide a
shortcut for it, like many our tools do it.
2026-02-20 08:25:12 +01:00
Lennart Poettering e1f7f33713 report: add 'list-sources' verb for enumerating metrics sources 2026-02-20 08:25:12 +01:00
Lennart Poettering 5046a12fbc report: switch to "verbs" command line interface, and add 'describe-metrics'
Let's prepare for a future where the "systemd-report" tool can do more
than enumerate metrics: let's introduce our usual "verbs" style
interface.

Let's also add a second command right-away: "describe-metrics" shows the
description of the metrics.
2026-02-20 08:23:11 +01:00
Zbigniew Jędrzejewski-Szmek c44446fe31 NEWS,man: mark systemd-report as experimental
I expect that we'll need to make incompatible changes to
all of this, so let's mark things appropriately.
2026-02-17 16:55:32 +01:00
Lennart Poettering e180087038 man: add super basic man page 2026-02-07 23:36:48 +01:00