Splunk Search

Regarding Splunk's eval random() function

maverick
Splunk Employee
Splunk Employee

Since it does not appear that you can pass a number into the random() function, I'm curious to know what is being used to seed it's "randomness".

Is it the first or last timestamp of the event(s) in your result set, or maybe the total number of events returned in the result set? Something else?

Marklar
Splunk Employee
Splunk Employee

The seed is generated from the pid and the time of day, not anything to do with the results.

Marklar
Splunk Employee
Splunk Employee

Correct. Every search is started in a new process, which is when the random number generator is seeded.

maverick
Splunk Employee
Splunk Employee

Okay. and by time of day you mean the current time that the search is actually ran?

Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...