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!

Database Performance Sidebar Panel Now on APM Database Query Performance & Service ...

We’ve streamlined the troubleshooting experience for database-related service issues by adding a database ...

IM Landing Page Filter - Now Available

We’ve added the capability for you to filter across the summary details on the main Infrastructure Monitoring ...

Dynamic Links from Alerts to IM Navigators - New in Observability Cloud

Splunk continues to improve the troubleshooting experience in Observability Cloud with this latest enhancement ...