All Apps and Add-ons

How can we access inputs.conf using python script in Splunk add-on builder?

Snehalg176
Loves-to-Learn Everything

How can we access parameters of a particular input from inputs.conf file so that we can disable that input after its first run or in case of any use case. 

Labels (2)
0 Karma

PickleRick
SplunkTrust
SplunkTrust
0 Karma

dauren_akilbeko
Communicator

Hello, @Snehalg176 

You can use splunklib.client — Splunk SDK for Python API Reference - specifically splunklib.client.Input.disable method. Another option is to use Splunk REST API, which previous method uses behind the scenes. 

0 Karma

Snehalg176
Loves-to-Learn Everything

Hi @dauren_akilbeko ,

Do you have some sample code to share on how can I implement it ?

0 Karma

Snehalg176
Loves-to-Learn Everything

Is there a chance to disable an input using python in Splunk add-on builder. If yes, how can we achieve it?

0 Karma
Get Updates on the Splunk Community!

Get Schooled with Splunk Education: Explore Our Latest Courses

At Splunk Education, we’re dedicated to providing incredible learning experiences that cater to every skill ...

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL  The Splunk AI Assistant for SPL ...

Buttercup Games: Further Dashboarding Techniques (Part 5)

This series of blogs assumes you have already completed the Splunk Enterprise Search Tutorial as it uses the ...