datalust / seq-input-gelf

Ingest GELF payloads into Seq
https://datalust.co/seq
Apache License 2.0
15 stars 8 forks source link

Add HTTP support #124

Open BenGrn opened 1 year ago

BenGrn commented 1 year ago

Hi, most libraries that send logs to graylogs or gelf logging servers can do so over HTTP. This allows logging to be done through a reverse proxy and HTTPS to be implemented simply with auto renew of certs. Can we please add support for http://0.0.0.0:12201 as a protocol for gelf injest?

KodrAus commented 1 year ago

Hi @BenGrn :wave:

Thanks for the suggestion! Adding HTTP support would be handy. It's not part of the GELF spec though so far as I can tell. Do most endpoints just accept the same line-delimited format as TCP? Are there any standard headers or content types used or expected?

BenGrn commented 1 year ago

Looks to me like a JSON string of the gelf record. The pygelf library referred to in the SEQ documentation appears to just create a json string the same as it sends to the TCP or UDP.

The graylog HTTP ingest documentation is available here: https://go2docs.graylog.org/5-0/getting_in_log_data/ingest_gelf.html

I would imagine desirable features would include the path being specified and if a certificate path is valid that the server was hosted as a HTTPS similar to how TLS is implemented. Personally, I can handle pathing and https via a reverse proxy, but others may want to host directly.

KodrAus commented 3 months ago

Just coming back here through a round of triage. This is something we're unlikely to add support for, but would consider a PR that did.

For new projects, we'd recommend ingesting via Seq's OTLP support, which supports HTTP, requires fewer moving parts, and can use API keys for authentication.