All Apps and Add-ons

How to send private message on slack from inline Splunk query?

zachsisinst
Explorer

Hi everyone, I've tried two different apps to do this, and I'm stuck. 

Goal: Send a private message to a slack user via an inline command so that I can pipe `| map` to the inline command to populate the recipient/message. 

I have tried two different apps now and neither are doing what I need.
  • https://splunkbase.splunk.com/app/2878/#/details : this one requires an 'incoming webhook' which is statically set to a channel. Overriding it with | sendalert slack param.channel="@myOverrideUserToSendTo" param.message="test"  doesn't seem to work.
  • https://splunkbase.splunk.com/app/3900/ : this one would work, however you cannot trigger it with an inline command, which I need in order to do my use case. If there is a way to do an inline `|sendalert`alert with this, I am unaware how to do this. 
Labels (2)
0 Karma

Roy_9
Motivator

@zachsisinst Following, got stuck with the same issue a while ago, let me know if you found anything

0 Karma

udwivedi
Splunk Employee
Splunk Employee

@zachsisinst Hi, I've a similar problem in which I'm using your first approach of overriding the channel name with slack user id's and it doesn't seem to work. Were you able to resolve this problem? 

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!

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...