Collect Logs from External Clients to VictoriaLogs¶
Stream logs from external client nodes (network devices, storage systems, fabric managers) to VictoriaLogs deployed in the Service Kubernetes cluster.
Overview¶
This procedure describes how to configure external log sources to send logs to VictoriaLogs (cluster mode) for centralized log collection and analysis.
VictoriaLogs accepts syslog (plaintext and TLS) and HTTP forwarding for log ingestion via the VLAgent LoadBalancer service.
Prerequisites¶
- Meet the VictoriaMetrics connection prerequisites, because the shared utility requires a healthy VictoriaMetrics deployment.
- Deploy VictoriaLogs and VLAgent through a source whose enabled log channel
targets
victoria_logs. - Ensure the VictoriaLogs and VLAgent LoadBalancer services have external IP addresses.
- Ensure the external client can reach vlinsert, vlselect, and VLAgent port
514over the required TCP or UDP protocol. - Export
OMNIA_DATA_PATHandOMNIA_PROJECT_NAMEfor the project whose connection details must be retrieved.
Procedure¶
-
Retrieve the Victoria connection details. Choose one execution method; do not run both commands for the same operation.
Run on: OIMcd src/main ./omnia.sh --run telemetry --tags external_victoriaRun on: OIMsource "$OMNIA_DATA_PATH/activate-omnia.sh" cd <OMNIA_SOURCE_PATH>/src/telemetry/playbooks ansible-playbook telemetry.yml --tags external_victoria -
Review the project-specific output:
$OMNIA_DATA_PATH/telemetry/output/$OMNIA_PROJECT_NAME/external_victoria/ |-- ca.crt # Present only when TLS is enabled `-- external_victoria_connect_details.ymlIn a multi-domain environment, always use the output below the applicable
OMNIA_PROJECT_NAME. The file provides these VictoriaMetrics values:victoria_metrics.endpoints.vminsert.write_endpointvictoria_metrics.endpoints.vmselect.query_endpointvictoria_metrics.endpoints.vmselect.ui_urlvictoria_metrics.tls.ca_crt
The generated endpoint scheme is
httpswhen thevictoria-tls-certsSecret exists andhttpotherwise.
Step 1: Obtain Endpoint Information¶
Retrieve the VLAgent endpoint information from the VictoriaLogs deployment.
-
Check the
vlagentLoadBalancer service to get the external IP:Run on K8s control planekubectl get svc vlagent -n telemetry -
Record the following endpoints:
- Syslog plaintext:
<LoadBalancer IP>:514 - Syslog TLS:
<LoadBalancer IP>:6514 - HTTP forwarder:
https://<LoadBalancer IP>:9481/insert/jsonline
- Syslog plaintext:
-
Retrieve the TLS CA certificate from the
victoria-tls-certssecret:Run on K8s control planekubectl get secret victoria-tls-certs -n telemetry -o jsonpath='{.data.ca\.crt}' | base64 -d > victoria-ca.crt
Note
VLAgent provides platform-managed syslog receivers. No additional configuration is needed on the Omnia side.
Step 2: Configure Syslog Sources¶
Configure external devices to send syslog messages to VLAgent.
Plaintext Syslog (Port 514)
- Access the configuration interface of your log source device.
-
Configure syslog forwarding to the VLAgent plaintext endpoint.
Example configuration:
Syslog server: <LoadBalancer IP> Port: 514 Protocol: TCP or UDP
Note
DNS mapping may be required in some devices for TLS certificate validation. Use the LoadBalancer IP if DNS is not configured.
TLS Syslog (Port 6514)
- Copy the VictoriaLogs CA certificate to the log source device.
- Access the configuration interface of your log source device.
-
Configure syslog forwarding to the VLAgent TLS endpoint.
Example configuration:
Syslog server: <LoadBalancer IP> Port: 6514 Protocol: TCP TLS: Enabled CA certificate: victoria-ca.crt -
Verify TLS handshake:
Run on external client nodeopenssl s_client -connect <LoadBalancer IP>:6514 -CAfile victoria-ca.crt
Step 3: Configure HTTP Forwarding Sources¶
Configure log sources that support HTTP forwarding to send logs in JSON Lines format to the vlinsert endpoint.
-
Configure HTTP log forwarding to the vlinsert endpoint.
Example configuration:
Endpoint URL: https://<LoadBalancer IP>:9481/insert/jsonline Method: POST Format: JSON Lines Headers: Content-Type: application/json -
Example JSON Lines payload format:
{"time":"2024-01-01T12:00:00Z","stream":"device-01","_msg":"System started"} {"time":"2024-01-01T12:01:00Z","stream":"device-01","_msg":"Connection established"}
Note
The vlinsert endpoint expects one JSON object per line (JSON Lines format).
Verification¶
Verify Log Ingestion¶
-
Access the VictoriaLogs query interface:
Run on K8s control plane or omnia_core containercurl -k https://<LoadBalancer IP>:9491/select/logsql/query -d 'query="{}"' -
Query for logs from a configured source:
query="{_stream='device-01'}" -
Verify that logs from the external source appear in the query results.
Note
Query latency depends on time range and data volume. Narrow the time range for faster results.
Note
VictoriaLogs does not return an error when log entries with timestamps outside the configured retention window are submitted. Log entries will be automatically removed from VictoriaLogs after the retention period.
Troubleshooting¶
- VictoriaLogs is reported unavailable: Enable a log source targeting
victoria_logs, deploy Telemetry, and confirm the vlinsert service has an external IP address. - VLAgent is reported unavailable: Inspect the
vlagentLoadBalancer service in thetelemetrynamespace and assign an external IP address. - Syslog records are missing: Confirm that port
514is allowed for the protocol selected by the external client. - The export stops before checking logs: Restore the required VictoriaMetrics deployment; the shared utility validates it first.
Next steps¶
- Use the generated
powerscale.isi_audit_commandswhen PowerScale log collection is enabled. - Retain the generated connection file as the authoritative endpoint output for the selected project and domain.