Alerting

Calling Fields From Alert Results to Output them in Slack

yoshilog
Explorer

I would like to ask about the line of code we put in the messages field in the Splunk Alert Action for Slack Notification. 

 

$result.users$$result.message$

 

Here is a screenshot of the send Message plugin details that we set in a test channel.

yoshilog_0-1632715170319.png

 

I would like to ask why, beginning last week - all of a sudden it began displaying this in Slack: 

 

yoshilog_1-1632715185806.png

 

Instead of the usual results we have that would indicate 

@yoshilog "Good day.. <Blah, blah>".

So what we did is update the code, to add a whitespace in between the two result calls.

 

 

$result.users$ $result.message$

 

 

Doing so, fixed the results, and led to the expected output in our Slack test channel.

@yoshilog "Good day.. <Blah, blah>".

However, within the team, there were some questions about what had changed in the past week, that suddenly caused the alert to not post the expected output in slack. (Since no one had changed / touched the alert for a long time). 

I have also gotten in touch with the plugin developer, however he has not responded so I resorted to posting here, since some Splunkers might have had some experience with the issue. 

 

Would appreciate your ideas re: what had happened. Thank you in advance!

Labels (1)
Tags (2)

sdupre
Engager

Seems like injection.   I see it too for Slack integration alert messages.

Mine is $result.requesting_server$$result.uri_path$. (trying to make a link)

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...