Getting Data In

Why is eval in props.conf not performing in a particular order?

atulpatel
Explorer

Below is my props.conf stanza please check I'm getting all fields except uid, even the url field which has similar extraction mechanism.

[my_sourcetype]
....
EVAL-message_id = mid
EVAL-url = substr(xurl, 0, 15)
EVAL-uid = substr(message_id, 0, 5)

0 Karma
1 Solution

VatsalJagani
SplunkTrust
SplunkTrust

Hello @atulpatel
Try this:

[my_sourcetype]
....
EVAL-message_id = mid
EVAL-url = substr(xurl, 0, 15)
EVAL-uid = substr(mid, 0, 5)

In your case it is not working because in props.conf all EVALs in a stanza execute parallel.

Hope this helps!!!

View solution in original post

VatsalJagani
SplunkTrust
SplunkTrust

Hello @atulpatel
Try this:

[my_sourcetype]
....
EVAL-message_id = mid
EVAL-url = substr(xurl, 0, 15)
EVAL-uid = substr(mid, 0, 5)

In your case it is not working because in props.conf all EVALs in a stanza execute parallel.

Hope this helps!!!

atulpatel
Explorer

Yeah I got it.

0 Karma

FrankVl
Ultra Champion

Evals are not performed in any particular order. You cannot do an eval that depends on another eval.

You will need do EVAL-uid = substr(mid, 0, 5).

Or replace EVAL-message_id = mid by FIELDALIAS-mid_as_message_id = mid AS message_id. Field aliasing is performed after field extraction, but before calculated fields (EVAL-* statements), so you can use the message_id alias in your EVAL-uid.

atulpatel
Explorer

I understand that all EVALs don't have any order.

0 Karma
Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...