Stackdriver Logging Flashcards

1
Q

What is cloud logging

A

Provides:
Storage for logs
User interface called the Logs Viewer
API to manage logs programmatically

Logging lets you read and write log entries, search and query your logs, export your logs, and create logs-based metrics.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Whom are logs created for

A

Logs are associated primarily with Google Cloud projects, although other resources, such as organizations, folders, and billing accounts, can also have logs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Logs Viewer

A

The Logs Viewer shows only the logs from one project, but using the Logging API, you can read log entries across multiple resources.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Log entries

A

A log entry records status or an event. The entry might be created by Google Cloud services, AWS services, third-party applications, or your own applications.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Creation of log entries

A

Created:
When services that routinely produce log entries are used, like Compute Engine or BigQuery.
When you connect the operations suite to AWS
When you install the Logging agent on your VM instances
When you call the entries.write method in the Logging API.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Payload

A

The “message” the log entry carries is called the “payload”; it can be a simple string or structured data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Logs

A

A log is a named collection of log entries within a Google Cloud resource. Each log entry includes the name of its log. A log name can be a simple identifier, like syslog, or a structured name including the log’s writer, like compute.googleapis.com/activity. Logs exist only if they have log entries.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Retention period for logs

A

Log entries are held in Cloud Logging for a limited time known as the retention period. After that, the entries are deleted. If you want to keep your log entries longer, export them outside of Cloud Logging.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Monitored resources

A

Each log entry indicates where it came from by including the name of a monitored resource

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Logging queries

A

An advanced query is a filter expression in the Logging query language. It is used in the Logs Viewer and the Logging API to select log entries, such as those from a particular VM instance or those arriving in a particular time period with a particular severity level.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Logs router

A

The Logs Router checks each log entry against existing rules to determine which log entries to ingest (store), which log entries to include in exports, and which log entries to discard.

All logs, including audit logs, platform logs, and user logs, are sent to the Cloud Logging API where they pass through the Logs Router.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Exporting logs using sinks

A

Log entries received by Logging can be exported to Cloud Storage buckets, BigQuery datasets, and Pub/Sub topics by configuring log sinks, which then continue to export log entries as they arrive in Logging. A sink includes a destination and a query that selects the log entries to export.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Logs-based Metric

A

A logs-based metric is a metric whose value is the number of log entries that match a query that you specify.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Audit logs

A

Google Cloud services write audit logs to record certain administrative or user actions on Google Cloud resources. Audit logs appear in the Logs Viewer alongside other logs.

Helps answer the questions of “who did what, where, and when?” within your Google Cloud resources.

Requires Cloud IAM role Logging/Logs Viewer or Project/Viewer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Access control for logs

A

The ability to access Logging logs is controlled by granting Cloud Identity and Access Management permissions to members.

IAM Viewer role - To read all logs
Cloud IAM Owner role - To read data access audit logs or access transparency logs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Types of Audit logs

A

Cloud Audit Logs maintains three audit logs for each Google Cloud project, folder, and organization: Admin Activity, Data Access, and System Event.

17
Q

Admin activity audit logs

A

Contain log entries for API calls or other administrative actions that modify the configuration or metadata of resources. For example, these logs record when users create VM instances or change Cloud Identity and Access Management permissions.

18
Q

Data Access audit logs

A

Contain API calls that read the configuration or metadata of resources, as well as user-driven API calls that create, modify, or read user-provided resource data. Data

Data-access operations on publicly shared resources are not recorded.

19
Q

System Event audit logs

A

Contain log entries for Google Cloud administrative actions that modify the configuration of resources. System Event audit logs are generated by Google systems; they are not driven by direct user action.

20
Q

Uptime Checks

A

Cloud Monitoring can verify the availability of your service by accessing it from locations around the world. You can use the results from these uptime checks in your alerting policies, or you can directly monitor the results in the Monitoring uptime-check dashboards.