Splunk Search

get the latest value in an array

garumaru
Explorer

Hi Guys,

I am working on searching data from Servicenow ticket, and tickets normally have some status for example:

#Ticket     #Status   #Time

Ticket1       Open        Sep 01

Ticket1       Closed     Sep 02

Ticket2        Open        Sep 01

Ticket2        Pending   Sep 03

 

How can I get a table only list the latest status like below:

#Ticket     #Status   #Time

Ticket1       Closed     Sep 02

Ticket2        Pending   Sep 03

 

Thank you!

Labels (2)
0 Karma
1 Solution

thambisetty
SplunkTrust
SplunkTrust
| stats latest(Status) as Status latest(_time) as _time by Ticekt
————————————
If this helps, give a like below.

View solution in original post

garumaru
Explorer

Thanks @thambisetty , I was using table but didn't think using stats.

0 Karma

thambisetty
SplunkTrust
SplunkTrust
| stats latest(Status) as Status latest(_time) as _time by Ticekt
————————————
If this helps, give a like below.
Get Updates on the Splunk Community!

Earn a $35 Gift Card for Answering our Splunk Admins & App Developer Survey

Survey for Splunk Admins and App Developers is open now! | Earn a $35 gift card!      Hello there,  Splunk ...

Continuing Innovation & New Integrations Unlock Full Stack Observability For Your ...

You’ve probably heard the latest about AppDynamics joining the Splunk Observability portfolio, deepening our ...

Monitoring Amazon Elastic Kubernetes Service (EKS)

As we’ve seen, integrating Kubernetes environments with Splunk Observability Cloud is a quick and easy way to ...