Getting Data In

How to Identify which HF is sending logs/metrics

_pravin
Contributor

Hi,

I have incoming data from 2 Heavy Forwarders.

Both of forward HEC data and the internal logs, how do I identify which HF is sending a particular HEC data?

 

Regards,

Pravin

Labels (1)
0 Karma

PickleRick
SplunkTrust
SplunkTrust

Unless you explicitly do something to the data (for example, add an indexed field containing the name of the forwarder) Splunk doesn't keep this kind of metadata.

0 Karma

_pravin
Contributor

I use Splunk Enterprise 9.0.4 and I tried adding _meta field which didn't work. I also tried adding INGEST_EVAL to transforms and tried sending the data, still no luck identifying the source.

0 Karma

marnall
Motivator

Can you post how your _meta field was configured? It should be in inputs.conf and have the format:

_meta = fieldname::fieldvalue

So if you have two heavy forwarders, one can have an input with:

_meta = meta_hfnum::1

and the other:

_meta = meta_hfnum::2

 

0 Karma

PickleRick
SplunkTrust
SplunkTrust

Unfortunately, there is just one "instance" of _meta entry in the whole config. So you can't "merge" separate _meta settings - one will overwrite another. That's why TRANSFORMS is a better approach.

I'm also not sure what _meta will do on the splunktcp input especially when handling an input stream already containing metadata fields.

0 Karma

marnall
Motivator

You can have separate _meta entries for different input stanzas. If you have two heavy forwarders handing different inputs then this should be doable. I've not tried it in a generalized input stanza but if the number of input stanzas are low then it is feasible to add _meta entries for each.

0 Karma

PickleRick
SplunkTrust
SplunkTrust

Yes. For different input stanzas - sure. But you can't - for example - have multiple apps defining multiple meta entries (like one for the environment the forwarder is in and another for the OS or team responsible or whatever) for the same input.

0 Karma

dural_yyz
Motivator

I had done something like this in a previous life.  Each HF should get an app which has a props definition under the default stanza.  For a small number of HF's you can do this manually, for a large group to manage from like a DS reference the Splunk environment variables.

props.conf

[default]
splunk_forwarder = <HOSTNAME>

It has been a while so play around with this.  I seem to remember it was a props.conf mapped to transforms.conf which inserted the hostname so find what works the best for you. 

0 Karma

PickleRick
SplunkTrust
SplunkTrust

And how is this supposed to work? There is no property called splunk_forwarder in any props stanza. Also, Splunk does variable expansion on a very limited set of settings.

0 Karma

hieuba6868
Explorer

you can check field call "splunk_server"

0 Karma

_pravin
Contributor

Hi @hieuba6868 ,

 

I am sending open telemetry data to heavy forwarder and the HF forwards the data to indexers. When I look at the  field 'splunk_server' I can see only the name of indexers. If I look at the data I can see the name of the otel source. In my current scenario I want to know which is the HF sending the data.

 

Regards,

Pravin

0 Karma

alemarzu
Motivator

Hi there, 

Not sure If you already did but the Monitoring Console could give you some insight. Mainly volume per token and activity by your HEC instances aka HFs.

Take a look under Indexing > Inputs > HTTP Event Collector: Instance

 

 

0 Karma
Get Updates on the Splunk Community!

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...