Dashboards & Visualizations

Is it possible to loadjob a post-processed search?

nick405060
Motivator

Hi guys,

Loadjob $post_process_search$ only loads $base_search$ data and not anything from the post-process search? Why? I understand it probably has something to do with how the $job.sid$ token is passed between the base and post-process search, but not more than that. How do I fix this?

  <search id="vpn_base">
    <query>
...
    </query>
    <done>
      <condition>
        <set token="base_search">$job.sid$</set>
      </condition>
    </done>
  </search>
  <search base="vpn_base">
    <query>
...
    </query>
    <done>
      <condition>
        <set token="post_process_search">$job.sid$</set>
      </condition>
    </done>
  </search>
0 Karma

woodcock
Esteemed Legend

In your post-process search add this to the end:

| addinfo | rename info_* AS _info_*

Then you can access $result._info_sid$ to get it.

0 Karma

nick405060
Motivator

This does not work. $result._info_sid$ still loads the base search.

0 Karma

woodcock
Esteemed Legend

Wow. That is shocking. I would open a support case because that makes no sense and really should be treated as a bug and fixed.

The reason to use an underscore is so that it is invisible in the panel and search results, but still available for us to use (it would be confusing to the users).

0 Karma

nick405060
Motivator

I would still like to know a "yes" answer to this question.

However, the obvious workaround is just to | makeresults | append [| loadjob "$base_search$"] in the now-pseudo post-process query and do away with any base setting/referencing, keeping the post_process_search token.

But it would be great to know a true answer, considering this is just a workaround and no longer includes a true post-process search. Even if you take away base_search in the original example, loadjobbing post_process_search still just loads the base search data.

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...