Getting Data In

Duplicate Event

msn2507
Path Finder

I am extracting logs using REST webservices and its a 3rd party application that maintains the logs. I have to poll every 5 minutes to get the logs. Splunk creates duplicate events for every poll, is there a way to avoid this ?
See the sample log event -
link text

Tags (2)

Ayn
Legend

No, you need to add that logic yourself. For file-based inputs, Splunk keeps track of where to start looking for new events in the file by storing to which position it's already read the file. You need to implement the same kind of thing in your scripted input yourself - find a unique incrementing ID of some kind, then after you've queried the REST webservice store the highest ID and then next time you're querying the webservice compare event ID's against that max ID to make sure you're only getting newer ones.

msn2507
Path Finder

I am redirecting the output of the webservice call to file and made it the source for splunk still I am seeing the duplicates. Note: I have checked the option "Follow tail"

Any help is appreciated

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...

SplunkTrust Application Period is Officially OPEN!

It's that time, folks! The application/nomination period for the 2026-2027 SplunkTrust is officially open. If ...

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...