Splunk Search

Why are my dashboard panels using a base search showing no results, but shows results if opened in search?

hettervik
Builder

Hi,

I've encountered this problem a couple of times now.

I have a dashboard where some of the panels run on a base search to save computing power. When I open the dashboard the panels using the base search are showing zero results, but if I open them in search I get the results I want. I'll provide the XML. Why could it be that this is happening? Is there some sort of missing capability that prevents me from seeing the results in the dashboard or app even though I can see the correct results when the panel is opened in search?

<search id="manageStoreEmployee">
    <query>eventtype=a OR eventtype=b</query>
    <earliest>$token_time_picker.earliest$</earliest>
    <latest>$token_time_picker.latest$</latest>
</search>

<panel>
      <title>Manage Store Employee - Front-End</title>
      <single>
        <search base="manageStoreEmployee">
          <query>| stats count(eval(status!=422)) as success</query>
        </search>
      </single>
</panel>
<panel>
      <title>Manage Store Employee - Back-End</title>
      <single>
        <search base="manageStoreEmployee">
          <query>| stats count(eval(status!=502)) as success</query>
        </search>
      </single>
</panel>
1 Solution

renjith_nair
Legend

Can you try this in your base search

eventtype="a" OR eventtype="b" | fields status, other fields

It's possible that filed extraction is not happening in dashboard since it runs search in smart mode by default

---
What goes around comes around. If it helps, hit it with Karma 🙂

View solution in original post

chuckers
Path Finder

More generically, put a

| fields *

at the end of the base query. This will make certain that you have all the fields you need for all the other panels that might reference that base.

edoardo_vicendo
Builder

I woud add that, instead of using:

| fields *

it is better to extract only the fields you need later on in all the other dashboard panels, this will improve the performance of the entire dashboard, here below the example:

| fields field1, field2, field3 etc..
0 Karma

edoardo_vicendo
Builder

Thanks, this suggestion fixed my issue

0 Karma

christoffertoft
Communicator

Thank you for this.. Solved my issue

0 Karma

cpershey
Explorer

this answer fixed my dashboard

0 Karma

renjith_nair
Legend

Can you try this in your base search

eventtype="a" OR eventtype="b" | fields status, other fields

It's possible that filed extraction is not happening in dashboard since it runs search in smart mode by default

---
What goes around comes around. If it helps, hit it with Karma 🙂

hettervik
Builder

That worked perfectly, I'd never thought of that being the problem. Thanks a lot!

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