Dashboards & Visualizations

Panel using Round and Sort

hsh
New Member

Hi

I have a dashboard that displays the numerial value of a field called method_duration.

The value is in ms.

The search string I have looks like this:

index=bec_ci_prod ("deploy_status_type=info" "direction=exiting") | sort + method_duration | chart count by method_duration span=10000

The result from thus is actually as expected. But now I would like to show the method_duration in seconds and not in miliseconds

I then add this to the search string:
| fieldformat method_duration=round(method_duration/1000)

The result is that when listing the result several of the results now have the same value like 5-6 results showing 0 etc.

How could you get Spluk to show all the rounded numbers that end up being 0 in just one result ?

Also when i try to add the span=10 all the results values are blank but the count remains. I think it has something to do with the first problem where multiple results now sjhow the same value

Any idea how to solve this ?

Tags (1)
0 Karma
1 Solution

inventsekar
SplunkTrust
SplunkTrust

Maybe, try eval round function -

| eval method_duration=round(method_duration/1000,3)
thanks and best regards,
Sekar

PS - If this or any post helped you in any way, pls consider upvoting, thanks for reading !

View solution in original post

0 Karma

hsh
New Member

thanks guys that helped with the results

0 Karma

inventsekar
SplunkTrust
SplunkTrust

Maybe, try eval round function -

| eval method_duration=round(method_duration/1000,3)
thanks and best regards,
Sekar

PS - If this or any post helped you in any way, pls consider upvoting, thanks for reading !
0 Karma

gcusello
SplunkTrust
SplunkTrust

you can use second instead miliseconds inserting an eval command like this before chart command
| eval method_duration=method_duration/1000
and obviously modifying span.
After this you can round your number to the decimals you prefer.
Bye.
Giuseppe

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