Dashboards & Visualizations

Why does an R search not work on a dashboard?

krwinters11
Path Finder

I have a search that is working great in the search app of splunk that includes and R script (through the R Project App). When I save it as a Dashboard Panel the search no longer works when I go to the dashboard, but it still works in the search app. Does anyone know why?

My hunch is that the dashboard is flattening out the lines of the R search and ignoring new lines. The search works like this:
...search... | r " source('predictR.r')
output=data.frame(predictR(input)) "
BUT not like this:
...search... | r " source('predictR.r') output=data.frame(predictR(input)) "
Which is why I think that the dashboard ignores new lines when the search app does not.

Any ideas? 🙂

1 Solution

mikebd
Path Finder

Use ; as a statement delimiter.

View solution in original post

mikebd
Path Finder

Use ; as a statement delimiter.

krwinters11
Path Finder

Awesome! thank you so much! I love when the solution is so simple 🙂

0 Karma

SanthoshSreshta
Contributor

Can we use Where condition here, so that we can get the results based on condition.???
if we can get that, can you please post the answer to

https://answers.splunk.com/answers/256185/drill-down-in-dashboard-with-r-integration-based-o.html?mi...

0 Karma

rfujara_splunk
Splunk Employee
Splunk Employee

Maybe try inserting \n at the end of each line. Just an idea...

0 Karma

krwinters11
Path Finder

It doesn't like that 😞 any other ideas?

0 Karma

aljohnson_splun
Splunk Employee
Splunk Employee

Could you try using < ![CDATA[ > in the dashboard?

0 Karma

krwinters11
Path Finder

Where would I put it in my search?

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