Dashboards & Visualizations

Advanced XML pie JSChart not showing

glmartin
Explorer

Hello Splunkers!

I'm trying to add a pie chart to one complicated dashboard, I have reduced the minimum non-working example to this:

<view template="dashboard.html">
    <module name="HiddenSearch" autoRun="True">
        <param name="search">dvc="192.6.1.249" | stats count by src_ip</param>
        <param name="earliest">-15m</param>
        <param name="latest">now</param>
        <module name="HiddenChartFormatter">
            <param name="charting.chart">pie</param>
                <module name="JSChart" layoutPanel="panel_row1_col1">
                <param name="width">100%</param>
            </module>
        </module>
    </module>
</view>

I can't spot the error, the search is returning correct results and if I create a simple XML with the same parameters it shows up nicely. Can anyone spot whats wrong here?

0 Karma

sideview
SplunkTrust
SplunkTrust

There's no layoutPanel on the first few modules, so they won't render anywhere at all. The real problem I think is that the view contains no Message module. Even in a custom view you should always make sure to have at least one Message module, and at least one with a "*" filter", so that you can catch big developer-level problems fast before you bang your head against them.

While some of the layoutPanel pitfalls no longer trigger red error messages, I think this particular case would have.

There is really no other developer-level messaging so working without a Message module, you're working a little blind.

0 Karma

glmartin
Explorer

As always I get the answer as soon as I ask in Splunkbase...

Changing the layoutpanel to the hiddensearch module (or the postprocess in the complex dashboard) seemed to resolve the issue!

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

What Is Splunk? Here’s What You Can Do with Splunk

Hey Splunk Community, we know you know Splunk. You likely leverage its unparalleled ability to ingest, index, ...

Level Up Your .conf25: Splunk Arcade Comes to Boston

With .conf25 right around the corner in Boston, there’s a lot to look forward to — inspiring keynotes, ...

Manual Instrumentation with Splunk Observability Cloud: How to Instrument Frontend ...

Although it might seem daunting, as we’ve seen in this series, manual instrumentation can be straightforward ...