Splunk Search

Why search query works in Search app, but is not working in a dashboard?

prad18
Path Finder

Hi

My search :

index="abc" (source="tac.log" DebugLevelSrc=xxx  "*ccc*") OR (source="crt.log" DebugLevelSrc=xxx "*ccc*" ) OR (source="mat.log" DebugLevelSrc=xxx "*ccc*" ) | replace "tac.log" WITH "QA  Log" in source | replace "crt.log" WITH "DEV  Log" in source| replace "mat.log" WITH "UA Log" in source | stats count by source

The above search works fine interactively (in splunk search box) but not in dashboard.
Splunk version used 6.1.3

Tried !CDATA [ tag but didnt work. and search doesn't have any regex

Please tell me whats going wrong in my search

Tags (2)
1 Solution

ndoshi
Splunk Employee
Splunk Employee

BTW, this has nothing to do with automatic simple XML Dashboard (the tag you added for this question), as that add-on is used to generate timecharts from a simple CSV file definition to quickly get trending dashboards.

Anyway, here's how you may debug your search. Make it simpler to test:

 index="abc" (source="tac.log" DebugLevelSrc=xxx "ccc") |replace "tac.log" WITH "QA Log" in source | stats count by source

If that works in search and doesn't work in dashboards, then, click on the little i in the panel for inspect in search (there is also an option to open in search) to see what search is run behind the scenes. If that search works in "open in search" and not in the the dashboard, then, you may want to contact support.

View solution in original post

somesoni2
SplunkTrust
SplunkTrust

Could you post your non-working dashboard code?

0 Karma

ndoshi
Splunk Employee
Splunk Employee

BTW, this has nothing to do with automatic simple XML Dashboard (the tag you added for this question), as that add-on is used to generate timecharts from a simple CSV file definition to quickly get trending dashboards.

Anyway, here's how you may debug your search. Make it simpler to test:

 index="abc" (source="tac.log" DebugLevelSrc=xxx "ccc") |replace "tac.log" WITH "QA Log" in source | stats count by source

If that works in search and doesn't work in dashboards, then, click on the little i in the panel for inspect in search (there is also an option to open in search) to see what search is run behind the scenes. If that search works in "open in search" and not in the the dashboard, then, you may want to contact support.

prad18
Path Finder

Thanks ndoshi

0 Karma

prad18
Path Finder

It worked !!

Problem was this field " DebugLevelSrc=xxx" which i've extracted had private permission. so search didn't work in dashboard.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...