Alerting

Use a Python module in a custom alert action

eden881
Path Finder

I have a custom alert action that I wrote using the manual on the documentation:

https://docs.splunk.com/Documentation/Splunk/7.3.1/AdvancedDev/ModAlertsIntro

I need to import a Python module (boto3) into my action's script.

How can I do that?
Where and how do I install the module?

0 Karma
1 Solution

MuS
SplunkTrust
SplunkTrust

Hi eden881,

you can download the module directory or use a python egg of the module, place it in the bin directory of your app (assuming you created your alert action in a seperate app) and use import boto3 at top of your script. That should import the module if all module dependencies are fulfilled.

Hope this helps ...

cheers, MuS

View solution in original post

MuS
SplunkTrust
SplunkTrust

Hi eden881,

you can download the module directory or use a python egg of the module, place it in the bin directory of your app (assuming you created your alert action in a seperate app) and use import boto3 at top of your script. That should import the module if all module dependencies are fulfilled.

Hope this helps ...

cheers, MuS

eden881
Path Finder

Thank you! It worked well.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...