All Apps and Add-ons

Rest API Modular Input: How to debug/params not working

tmontney
Builder

Edit: I originally had been parsing "Connections_incoming.txt", but it was coming in 6 hours late (due to UTC). Even after setting it in props, it still comes in late. Personally, I'm fine with using this method as it includes more data.

I'm unable to figure out why the REST app is pulling more results than it should. I'm accessing the Teamviewer API.

Docs: https://dl.tvcdn.de/integrate/TeamViewer_API_Documentation.pdf

Timestamps are in UTC. I've created tokens and they seem to be working.

import datetime

def datetoday():
      today = datetime.date.today()
      return today.strftime('%Y-%m-%d')

def timemfive():
      utcoffset = datetime.timedelta(hours=6)
      fivemins = datetime.timedelta(minutes=5)
      now = (datetime.datetime.now() + utcoffset)
      timemfive = now - fivemins
      return timemfive.strftime('%Y-%m-%dT%H:%M:%SZ')

def timenow():
      utcoffset = datetime.timedelta(hours=6)
      now = (datetime.datetime.now() + utcoffset)
      return now.strftime('%Y-%m-%dT%H:%M:%SZ')

The issue is, I'm getting more than 5 minutes of reports. It seems up to an hour. If I call a similar URL (via Postman), I get the intended results. So what I want to see now is the actual URL the app calls. Is that logged somewhere?

I'm also seeing the following:

DateParserVerbose - A possible timestamp match (Mon Jan  1 16:16:40 2007) is outside of the acceptable time window.

Can this cause problems, or is it simply notifying me? What's strange is the year appears to be in the past. I've tested both these functions with Python itself, and it outputs as expected.

0 Karma

baboonbones
New Member

Info on our community support here : https://www.baboonbones.com/#support

0 Karma
Get Updates on the Splunk Community!

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...