In the previous post we discussed the basics of port/latency monitoring using AppBeat. In this post we will discuss full stack server monitoring using a tool called Datadog.
Datadog is one of the leading application performance monitoring SaaS tools. We will cover how to setup a monitoring agent on your servers and configure Datadog to display metrics, trigger alerts, and even integrate with twilio to send SMS when there is a problem with the server.
The first thing to do is to sign up for the Datadog service here. Once completed, you can integrate your server into their dashboard by running the Datadog monitoring agent on your server as follows:
Installing the Datadog agent on the server
The installation procedure is pretty simple, once you login to your server:
DD_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx bash -c "$(curl -L https://raw.githubusercontent.com/DataDog/dd-agent/master/packaging/datadog-agent/source/install_agent.sh)"
Once the agent is installed on your machine, go to the Datadog dashboard and see if any events appear on the event log.
You can find the default dashboard panel of your system at the bottom of the Dashboard List under the “Host Dashboards” section.
Open the host dashboard and you’ll see all sorts of metrics, for example :
Integrating Twilio into Datadog
Twilio is an telecommunications SaaS platform where your can send SMS and make calls like as you would on a mobile phone.
To integrate Twilio, follow this tab path to get to the configurations tab:
To test if the Twilio integration is successful:
"Body":"Service seems to be down, check datadog portal"
*(XXX) XXX-XXXX is your phone number and (YYY) YYY-YYYY is the twilio number.
3. Copy & paste the message in the content payload and check the “encode as form” box
4. Add the URL listed above into the URL field and “update the configuration”.
5. Create a new monitor and select the metrics you want to monitor and when it asks “What’s happening”, enter “@webhook-twilio” and save the monitor.