All Apps and Add-ons

Get input from the query for horsemeter max value

sugan25
New Member

I have a requirement to have a horseshoe meter in my splunk xml dashboard. But I don't know , how to dynamically change its max value .

<viz type="horseshoe_meter_app.horseshoe_meter">
                <search>
                    <query>index=*** source=*** |spath path=testLog.appName output=appName|spath path=testLog.payload.sourceCount output=sourceCount|spath path=testLog.payload.publishedCount output=publishedCount |stats sum(sourceCount) as totalSource sum(publishedCount) as totalPublished </query>
                    <earliest></earliest>
                    <latest></latest>
                </search>
                <option name="horseshoe_meter_app.horseshoe_meter.maxValue">1000</option>
                <option name="horseshoe_meter_app.horseshoe_meter.minValue">0</option>
                <option name="horseshoe_meter_app.horseshoe_meter.useRangemap">true</option>
                <option name="horseshoe_meter_app.horseshoe_meter.valueColor">#555</option>
                <option name="horseshoe_meter_app.horseshoe_meter.dialColor">#d0d5d9</option>
                <option name="horseshoe_meter_app.horseshoe_meter.backgroundColor">#FFF</option>
                <option name="horseshoe_meter_app.horseshoe_meter.thresholdStyle">percentage</option>
                <option name="horseshoe_meter_app.horseshoe_meter.minRangeColor">#3fc77a</option>
                <option name="horseshoe_meter_app.horseshoe_meter.midRangeThreshold">55</option>
                <option name="horseshoe_meter_app.horseshoe_meter.midRangeColor">#fbcd2f</option>
                <option name="horseshoe_meter_app.horseshoe_meter.maxRangeThreshold">80</option>
                <option name="horseshoe_meter_app.horseshoe_meter.maxRangeColor">#b44441</option>
            </viz>

I want something like:

<option name="horseshoe_meter_app.horseshoe_meter.maxValue">$totalSource$</option>

and the chart should be based on totalPublished and the max range should be totalSource . Can anyone please help me to have this.

0 Karma

woodcock
Esteemed Legend

Click on Edit on the dashboard, click the Format visualization paintbrush icon on the panel, click Color ranges, click Manual, it should be obvious from there.

0 Karma
Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Dynamic formatting from XML events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  &#x1f680; Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Stronger Security with Federated Search for S3, GCP SQL & Australian Threat ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...