Splunk Search

is there a way to get metadata about a search result with loadjob

alecools
Engager

Hi,

I am trying to get the metadata info of the search artefact that is returned by loadjob (when loading the latest artefact of a saved search). e.g. the earliest time and latest time of the search job that generated the result set that is loaded by loadjob?

Thank you
Xiwen

Tags (1)
0 Karma

alecools
Engager

In the end, we had to put addinfo in the original search being loaded to have this info in the loadjob.

This adds additional fields in the original search results which can be used and manipulated afterwards.

Not ideal, but certainly does the job

0 Karma

dshpritz
SplunkTrust
SplunkTrust

Not sure about using loadjob for this, but you can certainly use REST:

| rest /services/search/jobs/<search id> | table earliestTime latestTime

alecools
Engager

would this work if i am using load job with saved search (i.e. owner:app:searchName syntax)?
I wont have the actual search id in this case.
sorry for not being clear in my original question.

0 Karma

dshpritz
SplunkTrust
SplunkTrust

You could certainly modify it to:

| rest /services/search/jobs | search label="<saved search name>" | table label earliestTime latestTime
0 Karma
Get Updates on the Splunk Community!

Upcoming Webinar: Unmasking Insider Threats with Slunk Enterprise Security’s UEBA

Join us on Wed, Dec 10. at 10AM PST / 1PM EST for a live webinar and demo with Splunk experts! Discover how ...

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...