Splunk Search

When I run my search, it returns results, but why am I getting "Search is waiting for input..." when used in a dashboard panel?

adamblock2
Path Finder

The following search returns results when I run it as a search, but not when it is used as a dashboard panel. The dashboard panel displays Search is waiting for input...

|eventcount summarize=false index=* 
|dedup index
|fields index
|map maxsearches=100 search="
|metadata type=sources index=\"$index$\" 
|eval index=\"$index$\""
|where relative_time(now(), "-2d") > lastTime
|where relative_time(now(), "-14d") < lastTime
|rename totalCount as Count firstTime as "First Event" lastTime as "Last Event" recentTime as "Last Update"
| fieldformat Count=tostring(Count, "commas")
| fieldformat "First Event"=strftime('First Event', "%c")
| fieldformat "Last Event"=strftime('Last Event', "%c")
| fieldformat "Last Update"=strftime('Last Update', "%c")
| table index, type,sourcetype,"First Event", "Last Event", "Last Update", Count

I think that for some reason, the \"$index$\" statement is the problem. Assistance with this would be appreciated.

Thank you.

0 Karma
1 Solution

somesoni2
Revered Legend

Replace each dollar $ sign with two dollar $$, when using in dashboard.

View solution in original post

0 Karma

somesoni2
Revered Legend

Replace each dollar $ sign with two dollar $$, when using in dashboard.

0 Karma
Get Updates on the Splunk Community!

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

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

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