Chapter 18; Monitoring, Logging and Cost Estimating Flashcards
Which tool is used to:
Collect, Store, Filter and Display log data?
Stackdriver Logging
Logs can come from virtually any source. Logging keeps log data for 30 days. If you need to keep log data longer than that, then you need to export the data to a log sink.
Log sinks may be a Cloud Storage bucket, a BigQuery data set, or a Cloud Pub/Sub topic.
What tool is used to provide distributed tracing services for developers to record trace data?
Cloud Trace
Trace data can be viewed as individual traces, or you can create reports that include parameters specifying a subset of traces to include.
Which page can you go to to learn about the current health status of GCP services?
Google Cloud Platform Status page
Which service can you make use of to provide estimates on the potential cost of setups in GCP?
GCP Pricing Calculator
- What Stackdriver service is used to generate alerts when the CPU utilization of a VM exceeds 80 percent?
- Logging
- Monitoring
- Cloud Trace
- Cloud Debug
Answer = B
The Monitoring service is used to set a threshold on metrics and generate alerts when a metric exceeds the threshold for a specified period of time, so option B is correct.
Option A is incorrect; Logging is for collecting logged events.
Option C is incorrect; Cloud Trace is for application tracing.
Option D is incorrect; Debug is used to debug applications.
- You have just created a virtual machine, and you’d like Stackdriver Monitoring to alert you via email whenever the CPU average utilization exceeds 75 percent for 5 minutes. What do you need to do to the VM to have this happen?
- Install a Stackdriver workspace
- Install the Stackdriver monitoring agent on the VM
- Edit the VM configuration in Cloud Console and check the Monitor With Stackdriver checkbox
- Set a notification channel
Answer = B
You must install the monitoring agent on the VM. The agent will collect data and send it to Stackdriver, so option B is correct.
Option A is incorrect because a Workspace is not installed on a VM; it is created in Stackdriver.
Option C is incorrect; there is no Monitor With Stackdriver check box in the VM configuration form.
Option D is incorrect because you set notification channels in Stackdriver, not on a VM.
- Stackdriver can be used to monitor resources where?
- In Google Cloud Platform only
- In Google Cloud Platform and Amazon Web Services only
- In Google Cloud Platform and on premises data centers
- In Google Cloud Platform, Amazon Web Services, and on premises data centers
Answer = D
Stackdriver can monitor resources in GCP, AWS, and in on-premise data centers, so option D is correct.
Options A through C are incorrect because they do not include two other correct options.
- Grouping a set of metrics that arrive in a period of time into regular-sized buckets is called what?
- Aggregation
- Alignment
- Minimization
- Consolidation
Answer = B
Aligning is the process of separating data points into regular buckets, so option B is correct.
Option A is incorrect; aggregation is used to combine data points using a statistic, such as mean.
Options C and D are incorrect; they are not processes related to processing streams of metric data.
- You have created a condition of CPU utilization, and you want to receive notifications. Which of the following are options?
- Email only
- PagerDuty only
- Hipchat and PagerDuty
- Email, PagerDuty, and Hipchat
Answer = D
All three options are valid notification channels in Stackdriver Monitoring, so option D is correct.
PagerDuty and HipChat are popular DevOps tools.
- When you create a policy to notify you of a potential problem with your infrastructure, you can specify optional documentation. Why would you bother putting documentation in that form?
- It is saved to Cloud Storage for future use.
- It can help you or a colleague understand the purpose of the policy.
- It can contain information that would help someone diagnose and correct the problem.
- Options B and C.
Answer = D
The documentation is useful for documenting the purpose of the policy and for providing guidance for solving the problem, so option D is correct.
Option A is incorrect; where a policy is stored is irrelevant to its usefulness.
Options B and C alone are partially correct, but option D is a better answer.
- What is alert fatigue, and why is it a problem?
- Too many alert notifications are sent for events that do not require human intervention, and eventually DevOps engineers begin to pay less attention to notifications.
- Too many alerts put unnecessary load on your systems.
- Too few alerts leave DevOps engineers uncertain of the state of your applications and infrastructure.
- Too many false alerts
Answer = A
Alert fatigue is a state caused by too many alert notifications being sent for events that do not require human intervention, so option A is correct. This creates the risk that eventually DevOps engineers will begin to pay less attention to notifications.
Option B is incorrect, although it is conceivable that too many alerts could adversely impact performance, but that is not likely.
Option C is a potential problem, too, but that is not alert fatigue.
Option D is incorrect because too many true alerts contribute to alert fatigue.
- How long is log data stored in Stackdriver Logging?
- 7 days
- 15 days
- 30 days
- 60 days
Answer = C
Stackdriver logging stores logs for 30 days. Storinglogs for a prolonged period will demand an archiving solution to relocate/copy the files to a suitable storage location. Option C is correct.
Option A, B and D are incorrect as they are the wrong period of time.
- You need to store log entries for a longer period of time than Stackdriver Logging retains them. What is the best option for preserving log data?
- There is no option; once the data retention period passes, Stackdriver Logging deletes the data.
- Create a log sink and export the log data using Stackdriver Logging’s export functionality.
- Write a Python script to use the Stackdriver API to write the data to Cloud Storage.
- Write a Python script to use the Stackdriver API to write the data to BigQuery.
Answer = B
The best option is to use Stackdriver Logging’s export functionality to write log data to a log sink, so option B is correct.
Option A is incorrect; there is a way to export data.
Options C and D are incorrect because writing a custom script would take more time to develop and maintain than using Logging’s export functionality.
- Which of the following are options for logging sinks?
- Cloud Storage bucket only
- BigQuery dataset and Cloud Storage bucket only
- Cloud Pub/Sub topic only
- Cloud Storage bucket, BigQuery dataset, and Cloud Pub/Sub topic
Answer= D
All three, Cloud Storage buckets, BigQuery data sets, and Cloud Pub/Sub topics, are available as sinks for logging exports, so option D is correct.
- Which of the following can be used to filter log entries when viewing logs in Stackdriver Logging?
- Label or text search only
- Resource type and log type only
- Time and resource type only
- Label or text search, resource type, log type, and time
Answer = D
All of the options listed can be used to filter, so option D is correct. Log level is another option as well.