Skip to content

Conversation

@jmyoung
Copy link

@jmyoung jmyoung commented Jun 3, 2025

This implements a new transport type, splunk. This reformats JSON-formatted output into the format required for the Splunk HTTP Event Collector, and then delivers them to the HEC.

This has been tested with Netflow v9 from a firewall using ng_netflow, where time_flow_start_ns is in nanoseconds. Required other information for the Splunk HEC call is demarshalled from the incoming data sent to the Send() method.

I'm very new to Go, so this implementation is probably imperfect. But it works well for my use case.

@lspgn
Copy link
Member

lspgn commented Jun 3, 2025

Hi @jmyoung
Thank you for your contribution.
Unfortunately I will have to politely decline adding it to the upstream branch.
I do not have enough time nor resources to maintain extra transport modules.
I usually advise to be piping the output of GoFlow2 to tools like Vector. Another possibility would be OpenTelemetry Collector.

The code looks ok although I would suggest to implement some kind of buffering (otherwise performances will be heavily impacted by thousands of HTTP requests per second).

I did provide similar explanations on some of the transports PRs
#131 #311 #359 #366 #320 #278 #124 #96 #41

@lspgn lspgn added the transport Related to transport libraries (Kafka) label Jun 3, 2025
@kellybyrd
Copy link

Just as a followup, the netflow2ng project is an example of using Goflow2 as a library and adding transport and format for ntopng to consume. So, maybe that's the approach you should take.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

transport Related to transport libraries (Kafka)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants