I've got a Search that works fine in the Search screen and correctly generates a bar chart.
index="production" source="s3://hydrow-android-logs-input-queue-prod/console/*" logWorkoutEndDebugStats releaseStage="production" | rename workoutEndInfo.videoRestartStats.videoStopped as videoStops | stats count by buildNumber, videoStops | eventstats sum(count) as itemTotal by buildNumber | eval percentage=round((count / itemTotal) * 100 , 1 ) | search videoStops = true | chart values(percentage) over buildNumber by videoStops
Error when rendering as chart on a dashboard:
When I Save it to a dashboard or create a new chart on the dashboard and enter the search as the datasource, I get the error below. if I change the visualization from a chart to a table, then the table renders fine. There's no indication of why the visualization works fine on the Search page, but not the dashboard.
Any suggestions on how to debug this would be very welcome!
I don't know how to find the source code of the error. I'll do some digging to find the internal logs. (I'm new to Splunk and more used to tools that show you the error rather than hiding it log files somewhere else. Is it even possible with SplunkCloud?)
I've dug into this one a bit, and I believe it could be due to the way Splunk uses XML to handle the visualisations. Have you tried using stats instead of chart or table, and then formatting the visualisation as a chart using the GUI?
The XML for an area chart should look something like the following, for example:
I.e. the chart XML is independent from the results returned by the search.
I've worked almost exclusively with on-premises instances, so I can't speak to the accessibility of the _internal index in Splunk cloud, though pressing F12 in your browser to display the console may hint at any other problems that could be occurring here.