SYSTEMD-R....SERVICE(8)
π SYSTEMD-R....SERVICE(8) β the systemd-report-files@.service page, bestie edition π
okay so real talk, this is a page from the systemd-report-files@.service corner of the systemd manual, and it is so much cooler than the name makes it sound. let's get into it π«Ά
β¨ NAME β¨
systemd-report-files@.service, systemd-report-files.socket, systemd-report-files β literally just: report the contents of files as system report metrics. that's the whole gig. it's giving "glorified cat but make it observability" π
πΈ SYNOPSIS πΈ
systemd-report-files@.service
systemd-report-files.socket
/usr/lib/systemd/systemd-report-files
yep that's it, three lines, no flags, no chaos. we love a low-drama synopsis π
π¦ DESCRIPTION π¦
okay so systemd-report-files@.service is a metrics source for systemd-report(1). what does that mean? it means it takes the contents of a configurable lil set of files and reports them as metrics, by implementing the io.systemd.Metrics Varlink interface on a socket that gets linked into the /run/systemd/report/ directory. main character behavior tbh π
π which files tho?? (the config dirs situation)
the files it reports get picked up from report.files/ subdirectories of the usual configuration directories, a.k.a.:
/etc/systemd/report.files//run/systemd/report.files//var/lib/systemd/report.files//usr/local/lib/systemd/report.files//usr/lib/systemd/report.files/
typically these directories are full of symlinks pointing at the actual files in the filesystem whose contents should be reported. like, the symlink is the vibe, the real file is the content. iconic β¨
the rules for who wins when names collide:
- entries with the same name in an earlier directory override those in a later one. so the order above is a hierarchy, first one listed takes the crown π
- an entry that is a symlink to
/dev/nullmasks the identically named entries in later directories β so no metric is reported for that name at all. ghosted, fr π«₯ - entries that are not regular files get ignored. we don't do weird stuff here π
π how each entry becomes a metric
each entry is reported as a metric named io.systemd.Files.NAME, where NAME is the name of the entry β and heads up, NAME must be a valid metric field name. no random characters, bestie, the format has standards π
the metric value is the verbatim contents of the file. no editing, no trimming, no "improving" it. what's in the file is what you get. periodt π
and the ones that get skipped entirely:
- files that cannot be read β for example because a symlink is dangling π
- files whose contents are not valid UTF-8 text β not it, sorry π«
β οΈ REAL TALK WARNING, DO NOT SKIP THIS ONE β οΈ access to this service is unprivileged, but it runs privileged. that combo is spicy πΆοΈ so be careful when you're symlinking files into the various report.files/ directories: this service might provide read access even if the client does not have the required direct access rights itself. so if you symlink something sensitive in there, you may have just handed out a backstage pass. think before you link, bestie, fr fr π
π SEE ALSO π
go read those too, they're the supporting cast and they ate π«Ά
and that's the whole page!! this was systemd 262.1, from the systemd-report-files@.service manual β stay hydrated, symlink responsibly, and remember: metrics are just files with main character energy πβ¨π
π¦ where this page comes from
- arch rolling: systemd 262.1-1 Β· LGPL-2.1-or-later AND CC0-1.0 AND GPL-2.0-or-later AND MIT-0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms