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!

Fueling your curiosity with new Splunk ILT and eLearning courses

At Splunk Education, we’re driven by curiosity—both ours and yours! That’s why we’re committed to delivering ...

Splunk AI Assistant for SPL 1.1.0 | Now Personalized to Your Environment for Greater ...

Splunk AI Assistant for SPL has transformed how users interact with Splunk, making it easier than ever to ...

Unleash Unified Security and Observability with Splunk Cloud Platform

     Now Available on Microsoft AzureOn Demand Now Step boldly into the AI revolution with enhanced security ...