Splunk Search

Why am I not able to tag single events when they don't have a small enough field to use for the tags?

npavlidis
Engager

The original problem I am trying to fix is that I am not able to tag single events since they dont have a small enough field to use for the tags(only unique field was over 1024 chars). The solution for this was to create on the sourcetype we care about a field that would generate sha256 values making a unique field.

What i have added in the local diretory of the TA for the sourcetype:

transforms.conf

[add_event_hash]
INGEST_EVAL = event_hash=sha256(_raw)
FORMAT = event_hash::$1
WRITE_META = true

props.conf

[thor]
TRANSFORM-event_hash = add_event_hash

and fields.conf

[event_hash]
INDEXED = true

The result after restarting Splunk and re-importing the data is that the field is successfully created with the value we want, yet the field value is not searchable. The search generates 0 results when searching for

event_hash=<hash>

but only generates the correct result when using

event_hash=*<hash>*

any assistance would be much appreciated

 

Labels (2)
0 Karma
Get Updates on the Splunk Community!

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

Splunk Decoded: Business Transactions vs Business IQ

It’s the morning of Black Friday, and your e-commerce site is handling 10x normal traffic. Orders are flowing, ...

Fastest way to demo Observability

I’ve been having a lot of fun learning about Kubernetes and Observability. I set myself an interesting ...