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
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!

Build the Future of Agentic AI: Join the Splunk Agentic Ops Hackathon

AI is changing how teams investigate incidents, detect threats, automate workflows, and build intelligent ...

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...