All Apps and Add-ons

Twilio app: How do I run the 2 python collection scripts and what is the correct directory path for configuring input?

otman01
Communicator

Hi everyone

I have 2 questions regarding the setup of the Twilio app from the documentation (https://apps.splunk.com/app/1765/#/documentation 😞

1) Step 2 "Edit log collection scripts" talks about running the 2 scripts
$ python get_call_logs.py
$ python get_sms_logs.py
How do we run these 2 scripts?

2) Step 3 "Configure input" says we have to Replace "$SPLUNK_HOME" with the correct directory of your Splunk installation. Will it be something like: C:\Program Files\Splunk\bin\splunk.exe?

Thank you.

0 Karma

himynamesdave
Contributor

1) right now you need to place the scripts outside of your Splunk installation with the Twilio Python library installed (https://github.com/twilio/twilio-python). You will need to create some sort of job to run the script. I am currently improving the app to fix this awkward setup.

2) just point the file path to where ever the scripts (explained above) write the CSV file out to.

0 Karma

fdi01
Motivator

question 1) In 2)
1 . you create your sript if it no exite.
2. you put your into .conf file matching, in script stanza
Note: in you stanza jost specific the path where you script is there like this example below.

The following example is for RADIUS authentication:

[authentication]
authType = Scripted
authSettings = script
[script]
scriptPath = "$SPLUNK_HOME/bin/python"
"$SPLUNK_HOME/share/splunk/authScriptSamples/radiusScripted.py"
question 2) In 3)
- the correct directory of your Splunk installation on LINIX is /opt/ and
SPLUNK_HOME= /opt/splunk/
where you run CLI on splunk is /opt/splunk/bin/
- the correct directory of your Splunk installation on windows is C:\Program Files\ and
SPLUNK_HOME= C:\Program Files\Splunk>
where you run CLI on splunk is C:\Program Files\Splunk\bin\

my english is very bad sorry.

0 Karma

otman01
Communicator

Thank you

I will try to make this configuration

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Vibe-coding, AI, and Splunkcraft: Highlights from the .conf26 Builder Bar

If you stopped by the Builder Bar at .conf26, thank you! This year, we brought ...

Thanks for the Memories: .conf26 Took Learning to New Heights

Thank you, Splunk Community, for making .conf26 in Denver one for the books. From packed Splunk University ...

Best Practices: Splunk auto adjust pipeline queue

When you enable autoAdjustQueue in Splunk, maxSize should be understood as the queue size Splunk starts with ...