Deployment Architecture

Can you help me with a query that removes duplicate events?

maheshsat
Explorer

I want to suppress duplicate events. I am trying the below command, but I'm unable to remove duplicate events.

index="id_sp" sourcetype="current" | dedup _raw | search  Period = "Jun-17"  Prepare="Actual" Fixed ="12345"  | rex "(.sap=\"(?[^\",]+))" | table Period  

Note i don't have any fields in which value get changed.

Tags (1)
0 Karma

bjoernjensen
Contributor

Hey,

your table (at the end of your spl) has just Period as column. Since you do a dedup on _raw and search for a certain (no wildcard) Prepare there almost must be only dublicate entries. Moreover your search is optimizable, and maybe you want to add more columns to the table:

index="id_sp" sourcetype="current" Period = "Jun-17" Prepare="Actual" Fixed ="12345"
| dedup _raw
| rex ".sap=(?<sap>\"(?[^\",]+))"
| table Period Prepare Fixed sap

Cheerz,
Björn

0 Karma
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...