Create a Foghorn
Now let's create a Foghorn to alert us if there is an issue. Setting up a Foghorn is very similar to setting up a view so let's set one up using the same 'random' data we did for the view. Return to the application management screen by clicking on our 'io.hrbr.helloapp:1.0.0' app.
Select to add a new Foghorn.
Once in the Edit Foghorn page. You'll want to click on the
Then click the option.
There a number of fields to fill out here so let's break them down quickly. We'll start with setting a trigger.
In case your name wasn't descriptive enough.
Beacon Message Type to Monitor
For our Linux System Information Beacon it's SYSINFO
Whatever you want it to be. Might as well make it descriptive
Again the Dot Notation that allows the Foghorn to read down your JSON. Here again it's currentLoad.avgload
Plenty of pre-built triggers. We are going with the simple Instantaneous Reading Above> so we can check this immediately.
The value you are measure agains. We want to see if the CPU goes over 50%.
Now you'll want to add a response. Select the button and add where you want your response sent.
You can choose between slack, SMS, and email. Since I don't have my slack API key handy, I'm going with e-mail. For instructions on how to add a Slack Response check out the Slack Integration Guide.
Once you have filled out the information and submit the form you will need to take one more step of actually starting your Foghorn. By default a Foghorn's initial state is stopped.
And if all is well you should start receiving e-mails every Hello Harbor generates a random number over .9.
To View the chart select View from the main menu and choose Display from Hello Hrbr Data.