Webstack monitoring

 Scenario

Image source: Holberton school

A new project has been launched at Kofi's tech startup. The system architecture for the project is illustrated above. Kofi has been assigned the monitoring of the system. This is necessary because in the tech industry, it is well known that "you cannot fix or improve what you cannot measure”. In this project, we will join Kofi in implementing Datadog to measure what is going on in the servers.

Web stack monitoring has two main categories:

  • Application monitoring: getting data about your running software and making sure it is behaving as expected
  • Server monitoring: getting data about your virtual or physical server and making sure they are not overloaded (could be CPU, memory, disk or network overload)

Execution

Step 1

  1. To begin using Datadog, Kofi first creates an account on the platform here.
  2. After creating an account, Kofi follows the steps outlined here to install Datadog on web-01.
  3. After following the installation process and selecting the finish button, Kofi is redirected to the quick start page of Datadog.

Step 2

  1. From the dashboard, Kofi selects monitors and selects New monitor from dropdown list. 

  2. Kofi selects metric and selects configure metric monitor.

  3. Kofi proceeds to choose a detection method, from 1, defines a metric in 2, sets alert condition in 3, configure notifications & automations in 4 and define permissions and audit notifications in 5.

  4. For his system, Kofi has to set up two monitors, one that checks the number of read requests issued to the device per second, and another that checks the number of write requests issued to the device per second.
  5. Referencing the System Check guide by Datadog, Kofi sets up the monitors using the steps below.
    • He acquires the queries for read and write as system.io.r_s and system.io.w_s respectively. 
    • In section 1, Kofi chooses a threshold alert which triggers an alert whenever a metric crosses a threshold.
    • In section 2, after selecting the source tab, Kofi defines the monitor's query by pasting the queries with the corresponding monitor.
    • In section 3, Kofi sets his alert condition by entering an alert threshold value.
    • In section 4, he sets a monitor name and a corresponding monitor message. 
    • Finally, he creates the monitor by selecting create at the page end.

Step 3 

  1. Kofi creates a dashboard to have quick access and reference to his monitors. From the side panel, he chooses Dashboards and New Dashboard form the dropdown list.

  2. He gives the dashboard a name and selects New Dashboard to snap widgets into place.

  3. He adds widgets by dragging and dropping from the right side panel.

Conclusion



With that, Kofi was able to monitor the web servers at his tech startup. In the future, with reference to the System Check guide, Kofi can replicate the monitoring on the other web servers used at his startup, he can also add more monitoring metrics as and when needed.

Comments