Splunk Enterprise Security

Can I pass tokens (like in email notice) as an arguments to Script for SMS alerting?

yossefn
Path Finder

Hi,

I have SMS alerts sent to me as an action of Splunk alert. I have successfully passed the arguments that available for me, like $SPLUNK_ARG_0 etc.
https://docs.splunk.com/Documentation/Splunk/7.2.4/Alert/ConfiguringScriptedAlerts

Can I use tokens as I use for email notifications to add more information to the SMS alert? The available arguments are not telling the full story of the related alert.

Thank you.

0 Karma

nareshinsvu
Builder

Yes- As per below app's description/details,

For the SMS message field , token substitution can be used just the same as for email alerts.

http://docs.splunk.com/Documentation/Splunk/latest/Alert/Setupalertactions#Tokens_available_for_emai...

You can try this app

https://splunkbase.splunk.com/app/2865/#/details

0 Karma

yossefn
Path Finder

Hi @nareshinsvu,

Thanks for your answer.
I was trying to use the tokens, but I'm not getting the expected results.

Please see the Script I'm using, let me know if you can assist.
It works for me just find with the available arguments for Script, but not for the Tokens.

/bin/bash

message="msg='$4', '$owner$'
uri=""
user="uid="
password="pass="
to="to=sms:*"

curl $uri --data $user --data $password --data $to --data-urlendode "$message"

By the way,
I know Twilio app, but I prefer to use our own SMS solution, to avoid the need to manage two alerting systems.

0 Karma
Get Updates on the Splunk Community!

Get ready to show some Splunk Certification swagger at .conf24!

Dive into the deep end of data by earning a Splunk Certification at .conf24. We're enticing you again this ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Now On-Demand Join us to learn more about how you can leverage Service Level Objectives (SLOs) and the new ...

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 ...