GCP Devops - Cloud Operations Test
with Questions Solved 100% Correct
Who can delete a Host project for Workspaces - Answer To delete a host project,
you must have the role of Project owner.
Cloud Logging for Python - Answer You can write logs to Logging from Python
applications by using the Python logging handler included with the Logging client
library, or by using Cloud Logging API Cloud client library for Python directly
where my python logs - Answer If messages are logged to Logging from App Engine or
Google Kubernetes Engine, the handler will send them to those environments'
respective resource types; otherwise, logs will by default appear under the python log
in the Global resource type.
Cloud Logging library for Python requires which Role? - Answer Using Cloud
Logging library for Python requires the IAM Logs Writer role on Google Cloud. Most
Google Cloud environments provide this role by default.
Python logs with App Engine - Answer App Engine grants the Logs Writer role by default.
The Cloud Logging library for Python can be used without needing to explicitly
provide credentials.
Cloud Logging is automatically enabled for App Engine applications. No additional
setup is required.
Python logs for GKE - Answer On Google Kubernetes Engine, you must add
the logging.write access scope when creating the cluster:
,gcloud container clusters create example-cluster-name --
scopes https://www.googleapis.com/auth/logging.write
Cloud Monitoring - Answer It provides visibility into the performance, uptime, and
overall health of cloud-powered applications. Collect metrics, events, and metadata
from Google Cloud services, hosted uptime probes, application instrumentation, and
a variety of common application components
Cloud Logging - Answer It is a fully managed service that performs at scale and can
ingest application and system log data, as well as custom log data from GKE
environments and VMs. Cloud Logging allows you to analyze and export selected logs
to long-term storage in real time
Cloud Trace - Answer It is a distributed tracing system that collects latency data from your
applications and displays it in the Google Cloud Console. Cloud Trace, a distributed tracing
system for Google Cloud, helps you understand how long it takes your application to
handle incoming requests from users or other applications, and how long it takes to
complete operations like RPC calls performed when handling the requests.
Cloud Debugger - Answer Cloud Debugger is a feature of Google Cloud Platform that
lets you inspect the state of an application, at any code location, without stopping or
slowing down the running app. Cloud Debugger makes it easier to view the application
state without adding logging statements.
You can use Cloud Debugger with any deployment of your application, including test,
development, and production. The debugger adds less than 10ms to the request
latency only when the application state is captured. In most cases, this is not noticeable
by users.
Cloud Profiler - Answer It continuously analyzes the performance of CPU or memory-
intensive functions executed across an application. Profiling is a form of dynamic code
analysis. You capture characteristics of the application as it runs, and then you use
this information to identify how to make your application faster and more efficient.
,Describe Monitoring - Answer Agents collect data and then send or stream info to Cloud
Monitoring in the Cloud Console. The Cloud Monitoring agent is a collectd-based
daemon that gathers system and application metrics from virtual machine instances
and sends them to Monitoring. By default, the Monitoring agent collects disk, CPU,
network, and process metrics. Configuring the Monitoring agent allows third-party
applications to get the full list of agent metrics.
Monitoring Agent - Answer Agent is a collectd-based daemon
Logging agent config - Answer google-fluentd is a modified version of the fluentd log
data collector. out of the box setup covers most use cases. Default installation covers OS
logs:
Linux: syslog
Windows : event viewer
Multiple third party application
Monitoring Workspace - Answer GCP's organizing tool for monitoring GCP & AWS
resources. Uptime checks, Dashboards, Alerts, Charts tools live in Workspace
Cloud Monitoring Components - Answer Workspaces, Installed agents, Alerts
filter_record_transformer - Answer This filter plugin mutates/transforms incoming
event streams in a versatile manner. If there is a need to add/delete/modify events, this
plugin is the first filter to try.It is included in the Fluentd's core.
It removes sensitive data. Reformat log fields
Logging is all about - Answer Collect, analyze, Export and retain Logs
, Cloud Metrics - Answer Raw data GCP uses to create charts. Cloud Monitoring collects
measurements to help you understand how your applications and system services are
performing. A collection of these measurements is generically called a metric.
Custom Metrics - Answer Custom metrics are metrics defined by users.Custom metrics
use the same elements that the built-in Cloud Monitoring metrics use:
A set of data points.
Metric-type information, which tells you what the data points represent.
Monitored-resource information, which tells you where the data points originated.
Types of GCP Metrics - Answer Value type: boolean, INT64, Double precision float, String
Metric Kind: Gauge- Measure specific instant in time e.g CPU utilization
Delta: Measure changes from last count
Zero Config monitoring - Answer No additional config, collects data for CPU
utilization, network traffic
Monitoring agent collects - Answer Granular metrics are collected such as
memory usage, third party app metrics NGINX , APACHE
What are uptime checks - Answer Periodic requests sent to a monitored resource
to check whether its up or down
Alerting policy IAM roles - Answer Monitoring editor, Admin, Project Owner
Monitoring Alert policy Editor - least privilege to create an Alert via Monitoring API
Python logs for Compute Engine - Answer When using Compute Engine VM instances,
add the cloud-platform access scope to each instance. When creating a new instance