All Apps and Add-ons

How to reduce overhead of getting current event status

uhaba
Explorer

We are connected via DBConnect to a DB which contains a type of ticket data. The database creates new rows when the status of the ticket is updated. The previous ticket status remains in the database table in older rows and therefore our index. Tens of thousands of tickets are lumped into the same database table. When querying the data flat out without dedup, there are 150k records for the last 24h for example. Once deduped on the ticket number I get down to 1,500 in the last 24h.

I am looking for suggestions on if there are any alternatives to running " | dedup ticket_num" to surface up the latest ticket status as it changes over time. The search to dedup just today's data took 94 seconds. If I wanted to run analysis on the last months data I am afraid this will become too painful to be used.

Example logs: (Looking to return the last row for example and ignore the others in the results)
1.1.2020:08:00:00, ticket_status=new, subject="something is busted", assigned_to=, ticket_num=1234
1.1.2020:09:00:00, ticket_status=assigned, subject="something is busted", assigned_to="helpdesk", ticket_num=1234
1.1.2020:10:00:00, ticket_status=assigned, subject="something is busted", assigned_to="operations, ticket_num=1234
1.1.2020:11:00:00, ticket_status=closed, subject="something is busted", assigned_to="operations, ticket_num=1234

Any recommendations are highly appreciated!

0 Karma

arjunpkishore5
Motivator

Similar to @richgalloway 's answer

However, if you need only ticket status, I would just get the latest value for that column

stats latest(ticket_status) as ticket_status by ticket_num
0 Karma

richgalloway
SplunkTrust
SplunkTrust

You may find stats latest(*) as * by ticket_num faster than dedup.

---
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...