Getting Data In

How can I force a full daily import from ServiceNow instead of using checkpoints?

renie
New Member

I'm looking for a way to perform a full import of data from ServiceNow every day.

Currently, I'm using the Splunk Add-on for ServiceNow to retrieve data from a ServiceNow table through the REST API. As expected, the add-on creates a checkpoint containing the timestamp of the last record retrieved, so that subsequent runs only collect newly created or updated records.

This behavior makes perfect sense for most use cases, but unfortunately not for mine.

The table I'm collecting contains the list of users assigned to a specific ServiceNow subscription (license). This table represents a daily snapshot of license assignments, and its contents change over time as users are assigned or removed from the subscription.

The problem is that this table does not have a date/time field that changes whenever the membership changes, so there isn't a suitable field that can be used as the checkpoint timestamp. As a result, once the initial import is completed, subsequent runs do not retrieve the complete current state of the table.

I looked for an option in the Splunk Add-on for ServiceNow to ignore or disable checkpointing and perform a full import every day, but I couldn't find anything. One possible workaround would be to delete the checkpoint file before each scheduled execution, but I'd prefer to avoid that approach if possible.

So my question is:

  • Is there any supported way to force the Splunk Add-on for ServiceNow to perform a full import on every scheduled run?
  • If not, what would you recommend as the best approach to retrieve the entire table through the ServiceNow REST API every day and index it into Splunk? I'm open to alternatives outside of the Splunk Add-on for ServiceNow if necessary.

Has anyone implemented something similar?

Thanks in advance!

Labels (3)
0 Karma

pedro_chicago
Explorer

We do something similar for Salesforce.  I am not sure if the ServiceNow TA and Salesforce TA work the same, but I would think this, or something similar, should work.

On any system that can make REST API calls to wherever the inputs are configured, schedule something like the following on a daily basis, offset from the input schedule, and replacing everything within the <...>:

curl -H "Authorization: Bearer <token>" https://<splunk_host>:8089/servicesNS/nobody/Splunk_TA_salesforce/storage/collections/data/Splunk_TA_salesforce_<input_object>_object_input_checkpointer/<input_object> -X DELETE

You will just need to figure out the correct REST API endpoint to use.

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!

From Data to Insight: Announcing the Winners of the Splunk Dashboard Contest

Hi Splunkers, First off, thank you to everyone who participated in our very first From Data to Insight: The ...

Splunk Developers: Construct Your Future at the .conf26 Builder Bar

Calling all Splunk architects, platform admins, and app developers: the site is open, and the blueprints are ...

Quick connection discovery mode for forwarders

When a Splunk forwarder loses connectivity to its indexers, it does not always reconnect immediately. In many ...