All Apps and Add-ons

REST API Modular Input v1.3.7 - Polling once a day

DanielFordWA
Contributor

I have added some python code to tokens.py file and set the polling interval to 86400. After enabling the input for the first time the data is always pulled back.

The code looks back over a number of days and populates the endpoint with the day, as each day rolls over, it should pull the subsequent days but no data is pulled.

If I wait 2 days, disabling the input and re-enabling the input pulls back the data for the correct day.

How can I debug the REST API Modular Input v1.3.7 to understand what the issue may be?

Tags (1)
0 Karma
1 Solution

alacercogitatus
SplunkTrust
SplunkTrust

My answer for this, until the author of the app changes it, is to use an if statement. Set your interval for 3600. Every hour have it run. But do a

if ( date.now().current_hour == 3) { do all the things }

I'm using pseudocode here, but, you get the point. If the current hour of the run is equal to 3 AM, then do all the back loading.

View solution in original post

alacercogitatus
SplunkTrust
SplunkTrust

My answer for this, until the author of the app changes it, is to use an if statement. Set your interval for 3600. Every hour have it run. But do a

if ( date.now().current_hour == 3) { do all the things }

I'm using pseudocode here, but, you get the point. If the current hour of the run is equal to 3 AM, then do all the back loading.

DanielFordWA
Contributor

I have noticed in postman that sometime when hitting the endpoint I can get an error returned first time and all subsequent tries work.

I assume if this was the case the default Backoff Time of 10 seconds would retry?

0 Karma
Get Updates on the Splunk Community!

Observability Unlocked: Kubernetes Monitoring with Splunk Observability Cloud

  Ready to master Kubernetes and cloud monitoring like the pros?Join Splunk’s Growth Engineering team for an ...

Wrapping Up Cybersecurity Awareness Month

October might be wrapping up, but for Splunk Education, cybersecurity awareness never goes out of season. ...

🌟 From Audit Chaos to Clarity: Welcoming Audit Trail v2

🗣 You Spoke, We Listened  Audit Trail v2 wasn’t written in isolation—it was shaped by your voices.  In ...