All Apps and Add-ons

Set Max value from the query for horseshoemeter chart

karthi25
Path Finder

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=load.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

garratleyk
Engager
<viz type="horseshoe_meter_app.horseshoe_meter">
              <search>
                  <query>index=*** source=*** |spath path=load.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>
               <progress>
              <set token="totalSource">$result.totalSource$</set>          
             </progress>
              </search>
              <option name="horseshoe_meter_app.horseshoe_meter.maxValue">$totalSource$</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>
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!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

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

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...