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
@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
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
@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.