Hi,
Is there a way to send logs to splunk using python script? Can you please send me the sample script?
Here is a link to the scripted input documentation:
https://docs.splunk.com/Documentation/SplunkCloud/latest/AdvancedDev/ScriptSetup
If you read through the documentation to the third page there is a sample script to poll a database for data to send to Splunk.
You could also use a python script to write a local text file and have the Universal Forwarder pick it up and send to Splunk. If you attempt this method be sure to include logic that cleans up the local logging file over time or you can consume the drive space.
Here is a link to the scripted input documentation:
https://docs.splunk.com/Documentation/SplunkCloud/latest/AdvancedDev/ScriptSetup
If you read through the documentation to the third page there is a sample script to poll a database for data to send to Splunk.
You could also use a python script to write a local text file and have the Universal Forwarder pick it up and send to Splunk. If you attempt this method be sure to include logic that cleans up the local logging file over time or you can consume the drive space.