Public cloud platforms and related account options change frequently. While the instructions given here were accurate at
Question:
Recall that in Project 1-5, you surveyed available GCP account options and had the opportunity to create a GCP account. In this project, you'll create an alerting policy to monitor a VM instance in GCP.
NOTE
At the time of this writing, all the services used in this project offered sufficient free limits to complete this project with no fees so long as you follow the instructions as written. To see a current list of free allotments included with GCP Stackdriver Monitoring, search online for a GCP Stackdriver pricing list, and check the "Free allotment per month" portion of the pricing schemes. At the time of this writing, this information could be found at https://cloud.google.com/stackdriver/pricing.
Complete the following steps:
- In your GCP console, create new project. Switch to the new project, and create VM instance using the e2-micro machine type and an Ubuntu boot disk. If you need to avoid accruing charges, be sure to select one of the free regions. (Search online for a current list of regions that support free instances in GCP.) After the VM is deployed, select it and, if necessary, click SHOW INFO PANEL then click the MONITORING tab. Click the check box to select the VM, and click Refresh to update the metrics on the MONITORING tab. Refresh the metrics every few minutes until the initial data appears. Which metrics are monitored here?
- In your GCP console's navigation menu, scroll down under OPERATIONS, and point to Monitoring and click Overview. (Note that you can hold down the Ctrl key on your keyboard to open the Monitoring overview in a different tab in your browser. You will need to view both Monitoring and Compute Engine services multiple times in this project.) Notice you have the option to create a dashboard, which would help you organize and monitor your alerts and other resources.
- In the left pane, click Alerting, and then click CREATE POLICY. Under step 1, click ADD CONDITION.
- Give the condition a name, such as NetworkIn. Click the empty field in the Target section, and select VM Instance. In the list of metrics that appears, scroll down and click Received bytes. In the Configuration section, configure the following settings:
- Condition triggers if: Any time series violates
- Condition: is above
- Threshold: 800
- For: 1 minute
- In step 2, click the Notification Channels dropdown list, and click MANAGE NOTIFICATION CHANNELS. This opens a new tab in your browser where you can add an email channel. Scroll down and add your email address. Then close the notification channels tab and return to the Create alerting policy tab. Refresh the list of notification channels and select your email channel. Click NEXT.
- Give the alert a name, such as VM-NetworkIn. Click SAVE.
- Return to Compute Engine, go to your VM's page, and copy its external IP address.
- On your local computer, open a PowerShell or Command Prompt window. Enter the following command, using the VM's public IP address: ping <ip-address> -t -l 1500 The -t switch runs the ping indefinitely until you tell it to stop. The -l switch increases the size of the ping packets. Note that the ping might not complete successfully; however, all you need to do is generate the incoming traffic so you can collect metrics on it.
- While your ping is running, return to the alerting policy's page in Monitoring, and watch it until the metric shows increased traffic and the alert is triggered. It could take several minutes for the alert to register. What happens next?
- Return to your instance's page, and click the OBSERVABILITY tab. What metrics show increased utilization?
- Stop the ping (press Ctrl+C in the PowerShell or Command Prompt window).
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill