# /lib/systemd/system/vmselect.service # VictoriaMetrics cluster — vmselect role. # # Executes incoming queries by fanning out to all configured # vmstorage nodes and merging the results. Listens on http :8481 # (read API at /select// and vmui at # /select//vmui/). # # The default -storageNode points at 127.0.0.1:8401 so a single-host # toy cluster Just Works after `systemctl start vmstorage vminsert # vmselect`. For real multi-host deployments override -storageNode # (and -replicationFactor / -globalReplicationFactor / # -search.denyPartialResponse / -dedup.minScrapeInterval as needed) # via a drop-in at # /etc/systemd/system/vmselect.service.d/override.conf # managed by your configuration-management tool of choice. [Unit] Description=VictoriaMetrics cluster — vmselect Documentation=https://docs.victoriametrics.com/victoriametrics/cluster-victoriametrics/ After=network-online.target vmstorage.service Wants=network-online.target [Service] Type=simple User=victoria-metrics Group=victoria-metrics ExecStart=/opt/victoriametrics/vmselect-prod \ -httpListenAddr=0.0.0.0:8481 \ -storageNode=127.0.0.1:8401 Restart=on-failure RestartSec=5 LimitNOFILE=1048576 NoNewPrivileges=yes ProtectSystem=strict ProtectHome=yes PrivateTmp=yes ProtectKernelTunables=yes ProtectKernelModules=yes ProtectKernelLogs=yes ProtectControlGroups=yes RestrictNamespaces=yes RestrictRealtime=yes RestrictSUIDSGID=yes LockPersonality=yes # vmselect's only persistent on-disk state is the optional rollup # result cache (-cacheDataPath, off by default). If you turn it on # in a drop-in, add ReadWritePaths= for the directory you choose. [Install] WantedBy=multi-user.target