All Apps and Add-ons

Splunk Add-on Builder Checkpoint issues

guarisma
Contributor

Hello,

I'm creating a REST input for my Add-on, the REST call goes like this

https://api.domain.com/get/me/logs?oldest=<date+time in epoch (secs)>

My Events look something like this:

  {"events": [  { "date": 1561939200, "id": "1234-6678-09982", "data": "Someone did something to this setting"},  { "date": 1561939100, "id": "1234-6678-09982", "data": "Someone else did something to this other setting"}, {...}]}

So my checkpoint path is events[0].date since the first event in the array is the latest one.

I set the interval for 300 sec (5 min)

But when ever the Script runs again, it repeats the last event and grab the new ones after, in that example I would find { "date": 1561939200, "id": "1234-6678-09982", "data": "Someone did something to this setting"} twice in Splunk.

How can I make it increment so it won't index the last event again?

Tags (1)
0 Karma

ArtiParty
Loves-to-Learn

I'm having the same issues, any resolution?

0 Karma

marnall
Motivator

Can you increment the checkpoint number by one before saving it using the helper functions in the add-on builder? This should prevent it from getting the last event multiple times when there are no new events after the last checkpoint.

0 Karma
Get Updates on the Splunk Community!

Fueling your curiosity with new Splunk ILT and eLearning courses

At Splunk Education, we’re driven by curiosity—both ours and yours! That’s why we’re committed to delivering ...

Splunk AI Assistant for SPL 1.1.0 | Now Personalized to Your Environment for Greater ...

Splunk AI Assistant for SPL has transformed how users interact with Splunk, making it easier than ever to ...

Unleash Unified Security and Observability with Splunk Cloud Platform

     Now Available on Microsoft AzureOn Demand Now Step boldly into the AI revolution with enhanced security ...