Files
systemd/units/systemd-report-netstat@.service.in
Lennart Poettering 0c2366a159 report: Add network statistics metrics generator
One of the fundamental counters we need to cover in metrics are
packet/byte counters on network interfaces. Let's add this.

We do this separately from networkd, to not unnecessarily affect
networkd operations.
2026-10-09 07:55:32 +02:00

45 lines
1.2 KiB
Plaintext

# SPDX-License-Identifier: LGPL-2.1-or-later
#
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
[Unit]
Description=Network Statistics Report Service
Documentation=man:systemd-report-netstat@.service(8)
DefaultDependencies=no
Conflicts=shutdown.target
Before=shutdown.target
[Service]
# Note that PrivateNetwork= is deliberately not used here, as this service is supposed to report on the
# network interfaces of the host.
CapabilityBoundingSet=
DeviceAllow=
DynamicUser=yes
IPAddressDeny=any
LockPersonality=yes
MemoryDenyWriteExecute=yes
PrivateDevices=yes
PrivateIPC=yes
PrivateTmp=disconnected
ProtectControlGroups=yes
ProtectHome=yes
ProtectHostname=yes
ProtectKernelLogs=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
ProtectSystem=strict
RestrictAddressFamilies=AF_UNIX AF_NETLINK
RestrictNamespaces=yes
RestrictRealtime=yes
RestrictSUIDSGID=yes
RuntimeMaxSec=1min
SystemCallArchitectures=native
SystemCallErrorNumber=EPERM
SystemCallFilter=@system-service
ExecStart={{LIBEXECDIR}}/systemd-report-netstat