Dashboards & Visualizations

XML dashboard errors at startup

jambajuice
Communicator

I can successfully run the following search from within Splunk:

sourcetype=ossim "Event received" ((plugin_id>=1001 AND plugin_id<=1131) OR plugin_id=1597) | lookup ossim_plugins plugin_id OUTPUT plugin_name | timechart count by plugin_name

I've tried to insert this search into a dashboard as follows:

  <chart>
    <title>IDS Events by Plugin (60 Minutes)</title>
    <searchString>sourcetype=ossim "Event received" ((plugin_id>=1001 AND plugin_id<=1131) OR plugin_id=1597) | lookup ossim_plugins plugin_id OUTPUT plugin_name | timechart count by plugin_name</searchString>
    <earliestTime>-1h</earliestTime>
    <option name="charting.chart">area</option>
    <option name="charting.legend.placement">right</option>
    <option name="charting.chart.stackMode">stacked</option>
    <option name="charting.chart.nullValueMode">connect</option>        
  </chart>

When I restart Splunk, I see the following message from the console:

Error while parsing path to file not well-formed (invalid token): line 6, column 88

What am I doing wrong here?

Thanks!

Tags (1)
0 Karma

Stephen_Sorkin
Splunk Employee
Splunk Employee

I'd suspect that the unescaped < and > are causing the XML validator to complain. A quick fix would be to wrap the searchString in a CDATA block or individually XML escape the unsafe characters. Alternately, you could refer to a saved search by name, which might be considered cleaner.

Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Unlocking Unified Insights: New Gigamon Federated Search App for Splunk

In today’s data-heavy environment, organizations are caught in a data distribution dilemma. As data volumes ...

GA: New Data Management App in Splunk Platform

Streamlining Data Management: Introducing a unified experience in Splunk Managing data at scale shouldn’t feel ...

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...