grafana / alloy

OpenTelemetry Collector distribution with programmable pipelines
https://grafana.com/oss/alloy
Apache License 2.0
1.27k stars 172 forks source link

Splunk HEC Exporter Integration for Grafana Alloy #1226

Open PatMis16 opened 2 months ago

PatMis16 commented 2 months ago

Request

This document proposes the addition of a feature that enables Grafana Alloy to forward logs directly to a Splunk instance using the Splunk HTTP Event Collector (HEC) protocol. This functionality would be achieved by integrating the Splunk HEC exporter from the OpenTelemetry Collector Contrib Repository into Grafana Alloy.

Use case

Many organizations, including ours, leverage Splunk as their primary log management solution. Currently, Grafana Alloy lacks a native way to send collected logs directly to Splunk. This necessitates workarounds, such as deploying a separate log forwarder. These workarounds introduce additional complexity, potential points of failure, and hinder a streamlined observability experience.

The proposed integration with the Splunk HEC exporter would address these challenges by providing the following benefits:

Technical Considerations

Future Considerations

Conclusion

Integrating the Splunk HEC exporter into Grafana Alloy would significantly improve the platform's log forwarding capabilities. This feature would streamline data flow, enhance user experience, and improve overall observability within the Grafana ecosystem. We believe this integration aligns with Grafana's commitment to providing a comprehensive and user-friendly observability platform.

github-actions[bot] commented 1 month ago

This issue has not had any activity in the past 30 days, so the needs-attention label has been added to it. If the opened issue is a bug, check to see if a newer release fixed your issue. If it is no longer relevant, please feel free to close this issue. The needs-attention label signals to maintainers that something has fallen through the cracks. No action is needed by you; your issue will be kept open and you do not have to respond to this comment. The label will be removed the next time this job runs if there is new activity. Thank you for your contributions!

ptodev commented 1 month ago

Hi, @PatMis16! Thank you for opening this issue. We could certainly add a new otelcol.exporter.splunkhec component. My only concerns with adding any new components is simply the maintenance cost. It takes effort to upgrade OTel in Alloy since we have to review OTel's changelog manually and make sure we're using the latest features.

To gauge how much maintenance a component requires, I usually check a few things:

Based on this, I'd say it's completely doable to have an otelcol.exporter.splunkhec component.

May I ask a few more questions please:

It is ok if you're not able to submit the initial PR or to assume ownership of the community component, but it'd mean that the work gets prioritised a little later. We will need to check further regarding prioritisation, because I'm not sure what the priority of this request vs other ones is.

In the long term, I hope we can automate most of this maintenance work. WIP features such as OTel config schema could autogenerate code and documentation. This could significantly reduce the need for community component ownership.

cabrinha commented 2 weeks ago

This would be nice.

PatMis16 commented 4 days ago

@ptodev Hi, yes I think I can do that. Can you explain or are there any ressources which explain how thiw with the "ownership" works and what is expected of the "owner"? BR, Patrick

PatMis16 commented 4 days ago

@ptodev Hi, What must be done for the initial PR? Thanks, Patrick

PatMis16 commented 4 days ago

Created Pull Request https://github.com/grafana/alloy/pull/1645