Chapter VIII: 8.2 Alerting Tes Implementation
To make sure that the alert is already working and applied to the instance, go to the console to trigger the CPU, RAM, and Network Usage by following these steps:
- Click the Alerting page.
Image 8.14 Instance Page
- Select the More link, and then click the Access Console tab.
Image 8.15 Instance Page - Access Console
- Then, login to the instance using username and password that have been set while creating the instance.
Image 8.16 Instance Login
- If the login is successful, then use these following commands to trigger the metric usage. For example, in this step try to trigger the CPU Usage and the recipients will receive the alert on their email address.
Table 8.2 Command for Trigger
Metric | Trigger Command |
---|---|
CPU | for i in 1; do while true; do :; done & done |
RAM | cat /dev/zero |
Disk | dd if=/dev/zero of=/tmp/tecst1.img bs=800MB count=1 |
Network | wget https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img |
Image 8.17 CPU Trigger Command
- Check the CPU Usage Diagram on Details Instance page. If the trigger command is running there will be ups or downs on the graphic line of the CPU Usage Diagram. Then, the alert will notify the recipients based on the conditions that have been applied to it. For example, the recipients will receive an alert on their email address if the CPU Usage is above 1% and will keep receive the alert once per minutes based on the alert settings.
Image 8.18 CPU Diagram After Trigger
Image 8.19 Recipients Alert