Files
metricspi/package/victoriametrics/vmagent.service
Dustin C. Hatch 7fddc6fef5
All checks were successful
dustin/metricspi/pipeline/head This commit looks good
pkg/v-m: vmagent: Remove IP address restrictions
Setting `IPAddressAllow` and `IPAddressDeny` instructs systemd to
construct BPF firewall rules to restrict traffic.  Since `vmagent` is
responsible for scraping metrics from hosts on the network, it does not
make any sense to restrict it to localhost-only communication.
2022-08-07 21:29:26 -05:00

50 lines
1.1 KiB
Desktop File

[Unit]
Description=Victoria Metrics vmagent
Documentation=https://docs.victoriametrics.com/vmagent.html
Wants=network-online.target
After=network-online.target
[Service]
Type=exec
Environment=httpListenAddr=[::1]:8429
Environment=loggerDisableTimestamps=true
Environment=remoteWrite_tmpDataPath=/var/lib/victoria-metrics/vmagent
EnvironmentFile=-/etc/sysconfig/vmagent
ExecStart=/usr/bin/vmagent -enableTCP6 -envflag.enable
Restart=on-failure
User=victoriametrics
Group=victoriametrics
ReadWritePaths=/var/lib/victoria-metrics
CapabilityBoundingSet=
DeviceAllow=
DevicePolicy=closed
LockPersonality=yes
MemoryDenyWriteExecute=yes
NoNewPrivileges=yes
PrivateDevices=yes
PrivateUsers=yes
PrivateTmp=yes
ProcSubset=pid
ProtectClock=yes
ProtectControlGroups=yes
ProtectHome=yes
ProtectHostname=yes
ProtectKernelLogs=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
ProtectProc=invisible
ProtectSystem=strict
RestrictAddressFamilies=AF_INET AF_INET6
RestrictNamespaces=yes
RestrictRealtime=yes
RestrictSUIDSGID=yes
SystemCallArchitectures=native
SystemCallFilter=@system-service
SystemCallFilter=~@privileged @resources
UMask=0027
[Install]
WantedBy=multi-user.target