How To: Set up a slack channel for alert
This article describes how to set up an alert to receive notifications about the latency and errors on existing Local Data Processing channels in slack application. In below example we will see how we can see alerts for channel chn2
1.Channel chn2 is already running in hvrhub4.
Step 1] Set up a maintenance task.
A]Right click on the scheduler which is running channel chn2 and select Maintenance tasks
B] In the Maintenance task window select Add to create a new task
C] In the next window enter the name you want to identify your task as. In this example it is named slack_alert and then click on OK to confirm
D]You will be navigated to the Maintenance Tasks window
Step 2] Specify the task(s) you would like your maintenance job to do. In this particular example we will set up an alert for latency for channel chn2. Below is the list of functions Local Data Processing maintenance can do. This is explained in detail in here (https://www.hvr-software.com/wiki/Hvrmaint)
- Scheduler checks
- Latency checks
- Logfile archives
- Journal purging
- Email alerts
- Slack alerts
- SNMP alerts
A]Check box for latency_limit to set it to 10 mins as shown below
Step 3] Set up slack alert.
A] Get the slack webhook url by clicking on your organization group. For eg Local Data Processing. which will show a drop down list
B] Navigate to Customize Slack->Configure Apps->Custom Integration->Incoming Webhooks
C] Click on Incoming webhooks and on the next prompt click on 'Add configuration'
D] On next screen select the slack channel that you would like to receive the notifications to in the drop down. Click on Add Incoming WebHooks Integration.
E] On the next screen a URL will be generated. Copy this URL.
F] Paste this URL in the slack webhook url field. And in the hvrchannel field enter the name of the channel that you would like to receive the notifications to. In this example it is hvralert.
G] To test if this is working fine, click on 'Send slack test'.
Step 4] Set the time interval you would like to receive the notifications.
Step 5] Save and Run this task to start receiving the notifications