Monitoring Splunk

How do I cascade intermediate search results to a final report?

bsivakumar
New Member

A. I have a database catalog built using DB query. It has 3 columns : Object Type , Name , description
B. I feed in the name as an parameter to search in log files for its occurrences
index=db NAME=* | map to index=log* search "NAME"
This returns source and source type.
Question
How will create a report that includes all five columns from 2 searches?
Ex: Object Type , Name , description, source, sourcetype.

Tags (1)
0 Karma

somesoni2
Revered Legend

Try like this

your DB Query giving field "Object Type" NAME description | rename "Object Type" as objType
| map maxsearches=10000 search="search index=log NAME=$NAME |..rest of search giving fields source sourcetype | eval objType=\"$objType$\" | eval description=\"$description$\" "
0 Karma

bsivakumar
New Member

It fails:
index="ehr_uta_db" OBJECT_TYPE="Field" NAME=* |dedup NAME OBJECT_TYPE DESCR | map search="search index="ehr_uat_prcs" $NAME$" |eval OBJECT_TYPE=\$OBJECT_TYPE\$ as ObjectType | eval NAME=\$NAME\$ as ObjectName | table ObjectType ObjectName source ReportID

0 Karma

somesoni2
Revered Legend

Try this version

index="ehr_uta_db" OBJECT_TYPE="Field" NAME=* |dedup NAME OBJECT_TYPE DESCR | fields NAME OBJECT_TYPE DESCR | map search="search index=\"ehr_uat_prcs\" $NAME$ | eval OBJECT_TYPE=\"$OBJECT_TYPE$\"  | eval ObjectName=\"$NAME$\" | table ObjectType ObjectName source ReportID"
0 Karma
Get Updates on the Splunk Community!

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 ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...