Dashboards & Visualizations

Why is the sort function not saving properly in dashboard panels?

twmoffit
Explorer

Hello,

I am having an issue where I want to sort my data in a chart but for some reason when I save and close the dashboard, my sort removed a " " (space) from the search. Here is an example,

I save the search as this and the largest 10 items return in my visualization:

....
| chart sum(FREE_GB) sum(USED_GB) over TS_NAME
| sort 10 -num("sum(USED_GB)")

However, when I save and then close or refresh the dashboard, ALL of the sorts on the dashboard change to this:

....
| chart sum(FREE_GB) sum(USED_GB) over TS_NAME
| sort 10-num("sum(USED_GB)")

Notice the space has been removed between "10 -num(..."

How do I stop this from happening? Is this just a bug in Splunk or is there something wrong with my syntax??
Thanks,

0 Karma

jplumsdaine22
Influencer

This is a bug, fixed in 6.5.4 (see discussion here: https://answers.splunk.com/answers/547674/splunk-bug-fields-command.html)

See SPL-140551, SPL-140828, SPL-140807 in fixed issues here: http://docs.splunk.com/Documentation/Splunk/6.5.4/ReleaseNotes/6.5.4

After upgrading I recommend you run the following command so you can identify any affected dashboards and fix them on the filesystem.

find $SPLUNK_HOME/etc/users $SPLUNK_HOME/etc/apps -type f -name '*.xml' -exec grep -lr 'sort-\|fields-' {} +

niketn
Legend

@twmoffit, we had noticed this issue with Internet Explorer (IE), however, the same worked fine with Chrome. Can you try that?

This seemed like a bug with IE.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

twmoffit
Explorer

Changing and saving the search in Chrome seemed to have fixed the problem for now. I hope this gets patched at some point soon though.

0 Karma

niketn
Legend

@twmoffit, did you check out, @jplumsdaine22 's answer that this bug has already been fixed in 6.5.4. If you are using 6.5.4 or later and still observe the issue you should report the same to Splunk Support through your Entitlement. Kindly upvote if this work-around has helped.

Also if you can upgrade to 6.5.4 or later then test and accept jplumsdaine22's answer.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

jplumsdaine22
Influencer

It has been patched (see below) However you will need to manually fix affected boards.

somesoni2
Revered Legend

Can you try like this?

....
 | chart sum(FREE_GB) as sum_FREE_GB sum(USED_GB) as sum_USED_GB by TS_NAME
 | sort 10 -num(sum_USED_GB)

OR just

....
 | chart sum(FREE_GB) as sum_FREE_GB sum(USED_GB) as sum_USED_GB by TS_NAME
 | sort 10 -sum_USED_GB
0 Karma

rjthibod
Champion

What version of Splunk are you running and what browser?

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