Dashboards & Visualizations

Showing marker gauge via advanced xml

mmelnick
Path Finder

I'm having trouble getting a marker gauge to show up in an advanced view. I'm not clear on how to specify the time range in the HiddenSearch parameter and I'm not clear on where to place the HiddenChartFormatter. And I'm not sure if I'm missing something else that's causing the gauge to not show up.

Here's the xml that I've put together:

<module name="StaticContentSample" layoutPanel="panel_row2_col1" group="QBLM">
  <param name="text">Status</param>
  <module name="HiddenSearch" layoutPanel="panel_row2_col1_grp1" group="Western Canada">
    <param name="search">index=sample earliest=04/08/2011:0:0:0 | stats count as tally | gauge tally 0 1000 2000 3000</param>
    <module name="HiddenChartFormatter">
      <param name="charting.chart">markerGauge</param>
      <param name="charting.chart.style">minimal</param>
      <module name="FlashChart">
        <param name="width">16%</param>
        <param name="height">200px</param>
      </module>
    </module>
  </module>
</module>

Is the search string correct? The original search intent is in the screen shot.Search string in basic search
I think I have it right with the earliest keyword and placing it with the index, but I'm not sure.

And what about the nesting of HiddenChartFormatter and FlashChart? Is that right? Probably not because the view shows a blank where the gauge should be. But I can't find a straightforward example to compare against.

Is there something else that I'm missing that's causing the gauge to not show up?!

Edit
Here's the resulting output from the Advanced XML view. You can see the sizing bar, so I know that the chart module is there, just nothing is showing up.
Resulting screen

Here's a screenshot of the search in a basic search. There are 2787 matching items, so the gauge in the advanced xml version should work.
Basic search result

Tags (1)
0 Karma
1 Solution

gnovak
Builder

I did notice something about your search. If you read about the HiddenSearch module is says:

HiddenSearch - Runs a search behind the scenes. Passes results on to any children. You must set autoRun to true so that the search actually runs.

Try adding autoRun="True" like this:

 <module name="HiddenSearch" layoutPanel="panel_row2_col1_grp1" group="Western Canada" autoRun="True">

View solution in original post

0 Karma

gnovak
Builder

I did notice something about your search. If you read about the HiddenSearch module is says:

HiddenSearch - Runs a search behind the scenes. Passes results on to any children. You must set autoRun to true so that the search actually runs.

Try adding autoRun="True" like this:

 <module name="HiddenSearch" layoutPanel="panel_row2_col1_grp1" group="Western Canada" autoRun="True">
0 Karma

gnovak
Builder

This really comes in handy in a jam. I love reading this. Helped me try new things. Bookmark this and make sure you pick your version of splunk for the current manual. http://docs.splunk.com/Documentation/Splunk/4.2.1/Developer/ModuleReference

0 Karma

gnovak
Builder

🙂 Great! Glad to help!

0 Karma

mmelnick
Path Finder

That did it. Thank you!

0 Karma

mmelnick
Path Finder

Thanks for getting back to me gnovak. I edited my post to include screenshots of what comes out and what the basic search produces.

0 Karma

gnovak
Builder

What do the results of the search look like? Is it just a single number? Can you provide an example of the results you get from the search you provided before the | gauge?

0 Karma
Get Updates on the Splunk Community!

How to Monitor Google Kubernetes Engine (GKE)

We’ve looked at how to integrate Kubernetes environments with Splunk Observability Cloud, but what about ...

Index This | How can you make 45 using only 4?

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

Splunk Education Goes to Washington | Splunk GovSummit 2024

If you’re in the Washington, D.C. area, this is your opportunity to take your career and Splunk skills to the ...