fix(victorialogs): enable syslog ingestion on TCP/UDP 514 (#18300)

VictoriaLogs only accepts syslog when -syslog.listenAddr.tcp/udp are set,
so network gear that ships logs over syslog (UniFi, firewalls, switches)
had nowhere to send them. Add both listeners to the service and migrate
existing installs on update.
This commit is contained in:
Nícolas Pastorello
2026-10-29 13:31:39 -03:00
committed by GitHub
parent 3cdee53cef
commit 143a973f4f
2 changed files with 11 additions and 1 deletions
+10
View File
@@ -32,6 +32,14 @@ function update_script() {
exit
fi
if ! grep -q -- '-syslog.listenAddr' /etc/systemd/system/victorialogs.service; then
msg_info "Enabling Syslog Ingestion"
sed -i '/^ExecStart=/ s|$| -syslog.listenAddr.tcp=:514 -syslog.listenAddr.udp=:514|' /etc/systemd/system/victorialogs.service
systemctl daemon-reload
systemctl restart victorialogs
msg_ok "Enabled Syslog Ingestion (TCP/UDP 514)"
fi
if check_for_gh_release "victorialogs" "VictoriaMetrics/VictoriaLogs"; then
msg_info "Stopping Service"
systemctl stop victorialogs
@@ -56,3 +64,5 @@ msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW}Access it using the following URL:${CL}"
echo -e "${GATEWAY}${BGN}http://${IP}:9428${CL}"
echo -e "${INFO}${YW}Syslog ingestion (TCP/UDP):${CL}"
echo -e "${GATEWAY}${BGN}${IP}:514${CL}"
+1 -1
View File
@@ -27,7 +27,7 @@ After=network.target
Type=simple
User=root
WorkingDirectory=/opt/victorialogs
ExecStart=/opt/victorialogs/victoria-logs-prod -storageDataPath=/opt/victorialogs_data -httpListenAddr=:9428
ExecStart=/opt/victorialogs/victoria-logs-prod -storageDataPath=/opt/victorialogs_data -httpListenAddr=:9428 -syslog.listenAddr.tcp=:514 -syslog.listenAddr.udp=:514
Restart=on-failure
RestartSec=5