Dashboards & Visualizations

How do I set up a dashboard to show 8 decimal points via the source code(as opposed to the UI)?

ADRIANODL
Explorer

Hi all,

I'm working with very small units of measurement down to 8 decimal digits.

When I try to set up my dashboards to show 0.00000000 via the source code (as opposed to the UI), I get the following warning:

Value "0.00000000" is not in the list of allowed values ["0","0.0","0.00","0.000","0.0000"]
The UI itself only allows me to pick values up to 4 decimal units.

IS there a way to work around such limitation of Splunk?

Cheers,
Adri

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

@ADRIANODL

Yes, Precision allowed up to 4 digits. But it is for numbers only. So let's make the value in String. If you have any unit for your value then append to make it a string. Check below dashboard for same.

<dashboard>
  <label>Long Number</label>
  <row>
    <panel>
      <single>
        <search>
          <query>| makeresults | eval A="1.1234567890" | eval A="Unit ".A</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
      </single>
    </panel>
  </row>
</dashboard>

Thanks

0 Karma

ADRIANODL
Explorer

Hi Kamlesh, thanks for your response, it worked to an extent. What happened is that the number was successfully converter to string and it's now showing the 8 decimal digits, however the "trend" doesn't show anymore, since I believe it cannot calculate trends based on strings.

Any ideas?

Cheers

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

@ADRIANODL

Yeah. Bcoz trend expects numerical values to calculate difference over different time periods. If we convert it to String then trend doesn't work.

But you can try a workaround. Use your existing code block and do following changes.
1) append dummy search YOUR_SEARCH | append [ | makeresults | eval count="" | table count ]. Change precision to 0. It will show you zero value with a trend.
2) Now, we need our value with 8 digit precision. Execute a search separately and set XML token token_abc. Use this token in unit option of the single view.<option name="unit">$token_abc$</option>

You will see just extra 0 in the chart as I believe.

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...