Table of Contents
Overview
With MetricFire you can set up notifications for alerts easily using the Alerts API, and the notifications can go directly to your favorite messaging apps. MetricFire supports notifications for alerts in email, Slack, PagerDuty, and more. This article will focus on how to set up a notification for an alert in Slack, so you can become aware of any major issues and prevent disasters. We will use MetricFire's product, Hosted Graphite. Get onto MetricFire's free trial so you can follow the steps in this blog on your own.
Webhooks
To get Slack set up as our notification channel, we need to use a webhook. Webhooks might look like an API, but they are a little different. They are pretty much URLs that receive data from a service. We want Hosted Graphite to send alert data to Slack so that Slack can post an automated message when an alert goes off from Hosted Graphite. On MetricFire’s Documentation, you can see links on how to set up the webhook. This article will show how to set up Slack’s webhooks.
Setting up the webhook
First, we will get our Slack channel set up for receiving payload data from our alert system on MetricFire. Click "Add more apps" in the left side menu on Slack's main page. Search for "incoming webhooks" and then add it.
It should take you to a page where you can specify which channel you want to send the alerts. After selecting and adding your channel, you should get to a page that has your Slack webhook URL.
Now that we have our webhook URL, we can send data to it from our Hosted Graphite interface. In Hosted Graphite, go to the Alerts tab in the left side menu, then click Notification Channels. Click "Add channel".
Select our text messaging service, which is Slack, give it a name, and finally add the webhook URL.
The next and last step is to link our Alerts to our new Slack Notification Channel. On Hosted Graphite, go to Alerts -> Alerts -> Add Alert.
You can verify a graph image by clicking Check Metric Graph next to the green button.
After getting our metrics, we just need to set when we want the alert, where we want to be notified about the alert, and how fast should the intervals between each alert be.
Now MetricFire will send payload data to the Slack Channel’s webhook URL whenever the alert has gone off from MetricFire. This will ping a message onto your channel, notifying you that something has gone wrong. This is very useful if you are monitoring a server that your customers are reliant on for time-crucial business, so you can fix a problem quickly if it arises.
Get to know our product better, and check out how MetricFire can fit into your monitoring environment! Get a free trial and start monitoring right away. Feel free to book a demo if you have questions about what MetricFire can do for you.