diff --git a/ct/victorialogs.sh b/ct/victorialogs.sh index ec3cc6198..b1d596d20 100644 --- a/ct/victorialogs.sh +++ b/ct/victorialogs.sh @@ -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}" diff --git a/install/victorialogs-install.sh b/install/victorialogs-install.sh index b8d06d664..a8b63812c 100644 --- a/install/victorialogs-install.sh +++ b/install/victorialogs-install.sh @@ -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