Splunk Enterprise

How to arrange the by "time" column in order of latest date first in chart command?

abhi04
Communicator

index=auto_prod_rmt sourcetype=auto_prod_rmt_healthcheck earliest=-7d |rex field=_raw "Application=(?.)\sTask" |rex field=_raw "Message=(?.)" |sort Application_Name | eval time=strftime(_time, "%d/%m/%Y") |dedup Application_Name,time | eval new_time = time.":".date_wday |sort -time|chart values(Status) over Application_Name by new_time

I want "new_time" to be arranged in order of todays date first and so on.
Please help me in achieving the same.

Labels (2)
0 Karma

cmerriman
Super Champion

from looking at this, I would redo the time format to be %Y/%m/%d, so that it would sort chronologically.

0 Karma

abhi04
Communicator

Tried below but does not help:

index=auto_prod_rmt sourcetype=auto_prod_rmt_healthcheck earliest=-7d |rex field=_raw "Application=(?.)\sTask" |rex field=_raw "Message=(?.)" |sort Application_Name | eval new_time=strftime(_time, "%Y/%m/%d") | dedup Application_Name, new_time | sort new_time| chart values(Status) over Application_Name by new_time

0 Karma

cmerriman
Super Champion

can you share an output?

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...