All Apps and Add-ons

Splunk Add-On Builder: Is there any documentation or information about the helper functions?

ssanborn
Engager

I'm working with the Splunk Add-On Builder and am interested in learning more about some of the helper functions that are provided; namely, helper.save_check_point.

This helper method is referred to in the "example data collection logic" code provided in the Add-On Builder wizard:

checkpoint related helper functions

save checkpoint

helper.save_check_point(key, state)

delete checkpoint

helper.delete_check_point(key)

get checkpoint

state = helper.get_check_point(key)

...but I can't find documentation anywhere about what these methods do, or what their inputs/outputs are. The key parameter in this example does not seem to be declared earlier in the example code, so I lack context to guess what this is doing.

There are additional helper methods referred to in example code of which I'm additionally interested in learning usage details, like:
helper.set_log_level
helper.get_global_setting
helper.get_user_credential
and so on.

I've tried searching through Splunk Docs, on google, etc. and find only the example code. Can someone point me in the direction of documentation/API reference for the Splunk Add-On Builder, specifically the helper module? Or can anyone provide some information about these helper functions?

Many thanks in advance.

1 Solution

cmeerbeek
Path Finder

They have been released. Hope they help you as much as they have helped me 😉
http://docs.splunk.com/Documentation/AddonBuilder/2.1.0/UserGuide/PythonHelperFunctions

View solution in original post

cmeerbeek
Path Finder

They have been released. Hope they help you as much as they have helped me 😉
http://docs.splunk.com/Documentation/AddonBuilder/2.1.0/UserGuide/PythonHelperFunctions

gwang_splunk
Splunk Employee
Splunk Employee

Currently, there is no doc about the helper function yet. But for the ckpt related functions.
the parameter key is a string which is the unique key for the state object. the state is a python dict which stores the states of your program.

You can think the ckpt as a simple key-value store. the value is a python dict and the key is a string.

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...