Splunk Search

How to pass data from a report to another report?

LearningGuy
Builder

Hello,

How to pass data/token from a report to another report?   Thank you for your help
I am trying to run a weekly report that produces top 4 students (out of 100), then once I find out the top 4 students, I will run another report that provides detailed information about grades for those 4 students
For example:

Report 1

StudentIDNameGPAPercentileEmail
101Student14100%Student1@email.com
102Student2390%Student2@email.com
103Student3270%Student3@email.com
104Student4140%Student4@email.com


Report 2

StudentIDCourseGrade
101Math100
101English95
102Math90
102English90

 

Labels (4)
0 Karma

PickleRick
SplunkTrust
SplunkTrust

https://docs.splunk.com/Documentation/Splunk/9.1.3/Search/Aboutsubsearches

Watch out however because subsearches have their limitations so if your subsearch is either long-running or returns many events, it may get silently finalized and you might not get proper results (you might get wrong results or no results at all).

Question is whether you have this Report 1 anyway or is it just a part of the functionality you want to achieve because it might be probably done differently with just a single search.

LearningGuy
Builder

Hello,

I put Table 1 into CSV file called "StudentRank.csv" and tried to use subsearch, it didn't seem to work
See below:

index=student
[search | inputlookup StudentRank.csv | head 2 | table StudentID]

I also tried to use appendpipe or append, it worked but it showed all students in CSV table (4 student)
| append [ | inputlookup StudentRank.csv | head 2 | table StudentID]

My goal is similar to
| search StudentID=101    ..  repeat until StudentID=102     (N out of Total, in this example, 2 out of 4)

The second search is a lot of details
Is it possible to pass a token in a scheduled search like when pass a token from a dropdown selection box in Splunk dashboard?

Thank you!!

0 Karma

PickleRick
SplunkTrust
SplunkTrust

You didn't read the docs I pointed you to. Stitching your searches using random commands won't work.

Results from a subsearch are rendered as a set of conditions to the outer search - you don't pass argumenta/tokens/whatever to the subsearch from the outer search. (We'll leave the map command for now).

Get Updates on the Splunk Community!

Technical Workshop Series: Splunk Data Management and SPL2 | Register here!

Hey, Splunk Community! Ready to take your data management skills to the next level? Join us for a 3-part ...

Spotting Financial Fraud in the Haystack: A Guide to Behavioral Analytics with Splunk

In today's digital financial ecosystem, security teams face an unprecedented challenge. The sheer volume of ...

Solve Problems Faster with New, Smarter AI and Integrations in Splunk Observability

Solve Problems Faster with New, Smarter AI and Integrations in Splunk Observability As businesses scale ...