katie/http-syslog-transformer

parses and forwards Nginx syslog data to VictoriaLogs

Katie KlossLucy!4d2d49f

main
1.1 KiB12 linesraw

http-syslog-transformer

This is a tiny service that accepts UDP packets from the Nginx syslog logger, parses their data using the default Nginx "combined" format, and forwards the data as structured JSON to a VictoriaLogs instance's stream API.

The resulting logs have all the usual benefits of structured logging, like ease of querying and fidelity of query results.

For debugging, this command will send a UDP packet in the expected format to an instance of the service running locally:

echo '<190>Dec 10 09:57:07 hypnos.hq.kat5.dev nginx_kat5_dev: 10.10.1.54 - - [10/Dec/2025:09:57:07 -0500] "GET / HTTP/2.0" 304 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:145.0) Gecko/20100101 Firefox/145.0"' | nc -u -w0 ::1 55555

Generative AI Policy

Every single line of code and text in this project was written by hand. No code produced by generative models is included.

1# http-syslog-transformer
2This is a tiny service that accepts UDP packets from the [Nginx syslog logger](https://nginx.org/en/docs/syslog.html), parses their data using the default Nginx ["combined" format](https://nginx.org/en/docs/http/ngx_http_log_module.html#log_format), and forwards the data as structured JSON to a VictoriaLogs instance's [stream API](https://docs.victoriametrics.com/victorialogs/data-ingestion/#json-stream-api).
3
4The resulting logs have all the usual benefits of structured logging, like ease of querying and fidelity of query results.
5
6For debugging, this command will send a UDP packet in the expected format to an instance of the service running locally:
7```
8echo '<190>Dec 10 09:57:07 hypnos.hq.kat5.dev nginx_kat5_dev: 10.10.1.54 - - [10/Dec/2025:09:57:07 -0500] "GET / HTTP/2.0" 304 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:145.0) Gecko/20100101 Firefox/145.0"' | nc -u -w0 ::1 55555
9```
10
11# Generative AI Policy
12Every single line of code and text in this project was written by hand. No code produced by generative models is included.