- Products
- Learn
- Local User Groups
- Partners
- More
Check Point Jump-Start Online Training
Now Available on CheckMates for Beginners!
Why do Hackers Love IoT Devices so Much?
Join our TechTalk on Aug 17, at 5PM CET | 11AM EST
Welcome to Maestro Masters!
Talk to Masters, Engage with Masters, Be a Maestro Master!
ZTNA Buyer’s Guide
Zero Trust essentials for your most valuable assets
The SMB Cyber Master
Boost your knowledge on Quantum Spark SMB gateways!
As YOU DESERVE THE BEST SECURITY
Upgrade to our latest GA Jumbo
CheckFlix!
All Videos In One Space
Hi All,
I want to write custom script for sending SmartEvent alerts to Slack via mail. I cannot use default mail reaction because it send graphics as attachment and as the number of attachment is 25 which is higher than Slack application Accepts, I would like to create my own external script which will send alert in defined format. The problem is I cannot find any example or sample script in Internet which I can use as guide. It would be really helpful If someone can share sample code. Thanks in advance!
This doesn't use any email functionality because I don't have that available to test but I was able to create a basic app using the Incoming Webhooks function when building an app in Slack.
Slack will provide an example using Curl that can be used in a script on the Smartevent server.
In my case, my script is placed under /home/admin/scripts
#!/bin/bash
curl_cli -kX POST -H 'Content-type: application/json' --data '{"text":"Hello, World!"}' https://hooks.slack.com/services/RANDOMSTRINGPROVIDEDBYSLACK
I then created an automatic reaction that triggers the script when called.
When triggered, it runs the curl script to post whatever message is defined in the "--data" portion of the curl command.
I'm sure there are better options available when interacting in Slack, but this was my quick effort that might provide some direction.
Hello, Thank you for provided script. However mostly I need script example which shows way of getting values from event data.
About CheckMates
Learn Check Point
Advanced Learning
YOU DESERVE THE BEST SECURITY