Monitoring and Logging Flashcards
What is Cloud Logging?
A fully managed, real-time log management service with storage, search, analysis and alerting at exabyte scale.
It automatically collects logs from Google Cloud resources, and can be configured to collect logs from on-prem resources, apps and other cloud providers.
You can also set alerts when a specific log comes in.
Source - https://cloud.google.com/logging?hl=en
How can you get logs from applications and third-party software?
By using a client library (apps only) or installing the ops agent which will send logs that were written to stdout or stderr to your project.
How can you view the logs?
By using the Google Cloud console (Log explorer or Log Analytics).
Logs explorer is recommended for viewing and Log Analytics is recommended for aggregate/analysing.
What are the two types of Cloud Logging alerts?
Log-based alert (for when you’re interested in an event happening) and Log-based metric (alerts you when a metric (cpu usage, memory usage, etc) threshold is crossed).
How are Cloud Logging logs stored?
By default they’re stored in a bucket, without any configuration on your part.
You can route the to other places such as:
Cloud Logging Log buckets
Other Google Cloud Projects (this logs can’t be analysed by Error reporting)
Pub/Sub topics (logs are converted to JSON before being sent to topic)
BigQuery datasets
Cloud Storage Buckets
What are the different kinds of logs in Cloud Logging?
Platform - written by google cloud services
Component - Generated by Google-provided software components.
Security - who did what, where and when
User-written - logs from custom applications and ser4vices
Multi-Cloud and Hybrid - logs from other cloud providers and on-prem infrastructure
What are the two different kinds of security log in Cloud Logging?
Cloud Audit - logs generate by your actions on your resources
Access Transparency - actions taken by Google on your resources
How is Cloud Logging charged?
By volume of logs stored across buckets and by retention period beyond the default (30 days).
Creating log-based metrics costs money.
Also, the _Required log bucket does not incur any charges as it is used to log system events and audits.
Also, also, streaming logs to a log bucket costs money.
Does routing copy or move logs to the destination?
It depends. You can configure it to go to multiple destinations or to a single one.
Note that routing a single log to multiple destinations counts toward your storage allocation (it can cost you money)
What are sinks in Cloud Logging?
Sinks are a filter that decide where a log should go using provided inclusion and exclusion filters.
They belong to a Google Cloud Project, a billing account, a folder or /and an organization.
Do sinks act independently of each other?
Yes, they do. This allows you to route logs to wherever you’d like without being affected by the existing sinks.
What are the default sinks in Cloud Logging?
_Required and _Default.
What is Cloud Debugger/Snapshot Debugger?
Snapshot debugger is an open source debugger that allows inspection of running cloud apps.
It can be used with any deployment of an application, and doesn’t affect the app’s performance.