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!

Developer Spotlight with Brett Adams

In our third Spotlight feature, we're excited to shine a light on Brett—a Splunk consultant, innovative ...

Index This | What can you do to make 55,555 equal 500?

April 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this ...

Say goodbye to manually analyzing phishing and malware threats with Splunk Attack ...

In today’s evolving threat landscape, we understand you’re constantly bombarded with phishing and malware ...