redpanda-data / connect

Fancy stream processing made operationally mundane
https://docs.redpanda.com/redpanda-connect/about/
8.12k stars 832 forks source link

Add Splunk_hec label to metrics output #2609

Open FluffySocks32 opened 4 months ago

FluffySocks32 commented 4 months ago

Hi,

When using the splunk_hec output the label fails to be added, resulting in the field showing up as null from the statsd output.

I added the following below line 107 of the splunk_hec template, and it successfully adds the label back in.

` metrics_mapping: |

!blobl

meta label = $label | "" `

Long story short, I can't add this in as a PR. Would it be possible to confirm this is actually a fix?

Thank you

mihaitodor commented 4 months ago

Hey @FluffySocks32 👋

Long story short, I can't add this in as a PR.

Why not? Feel free to create a fork and send a PR from there.

Would it be possible to confirm this is actually a fix?

Not sure how. Someone would have to test it with a Splunk account, since there are no integration tests and not sure if you can run a standalone Splunk emulator as a Docker container. Also, in the Splunk {template_output.yaml](https://github.com/benthosdev/benthos/blob/43517e6ed43167ccb29477fe1f6666d742be5f94/internal/impl/splunk/template_output.yaml) file you linked has no statement containing label, so using $label in that metrics_mapping looks wrong, but I guess I'm missing something...