Unit 4 Oci
Unit 4 Oci
OCI
Monitoring and Observability
1
Contents
Observability and Management
Introduction.
Monitoring
Monitoring - Illustration
Logging
Logging - Illustration
Events
Events and Notification -
Illustration
Analytics and AI Introduction
Data Integration
Data Flow
Data Catalog
Data Science 2
Monitoring and Observability
• The cloud has revolutionized the way businesses consume technology.
• Business + Technology
• So,
• Changes to operational models are necessary.
• Changes include:
• The shared responsibility model between the business and cloud providers
• The need for the business to maintain applications on-premises and in multiple
clouds
• IT team requirements to integrate existing toolsets with new cloud platform tools
3
How Monitoring works
4
What is Monitoring and Observability?
• OCI offers predefined sets of metrics, logs, and events to provide visibility into internal infrastructure and
services. OCI also provides integrations with Grafana, PagerDuty, and Slack, in addition to supporting standards
from the Cloud Native Computing Foundation (CNCF), such as CloudEvents and OpenTracing.
• Metrics: You can see a comprehensive view of the metrics that are emitted by OCI services by using Metrics
Explorer in the Console. For more information about OCI Monitoring and a list of services that emit metrics,
• Monitoring lets you define thresholds on resource metrics to generate alarms. Alarms can feed into the OCI
Notifications service. You can also access metrics for integration with third-party tools that are cloud vendor
agnostic, such as Grafana, which is an open-source platform for monitoring and analytics.
• Logs: OCI Logging provides access to logs from OCI resources. Logs include critical diagnostic information that
describes how resources are performing and being accessed.
• Events: OCI services emit events. Events are structured messages that indicate a state change in OCI resources.
Examples of events include:
• Creating an instance
• Deleting an instance
• Creating, updating, or deleting a resource
• Events can be routed by the Notifications service to appropriate channels. Events can also feed into OCI
Functions for actionable items, such as notifying a specific team about the launch of an instance. For more
information about services that emit events,
6
Services and features include:
• Monitoring: Enables OCI services and customers to emit metrics about OCI customer resources. Monitoring
capabilities include service metrics, Metrics Explorer, and alarm status and definition. You can configure
alarms with thresholds to detect and respond to infrastructure and application anomalies.
• Health Checks: Provides high frequency external monitoring to determine the availability and performance
of any publicly facing service, including hosted websites, API endpoints, or externally facing load balancers.
• Application Performance Monitoring (APM): Provides deep visibility into the performance of
applications and enables DevOps professionals to diagnose issues quickly. APM is compatible with
OpenTracing and OpenMetrics for distributed tracing, and combines end user monitoring with synthetic
monitoring. It can also ingest telemetry from microservices deployed in Kubernetes or Docker containers.
• Database Management: Provides comprehensive database performance and management capability for
each type of Oracle Database, including OCI and on-premises. This capability significantly reduces the
burden on database administrators by providing a full-lifecycle solution encompassing monitoring,
performance management, tuning, and database administration.
7
Services and features Conti.
• Logging: Provides easy ingestion of log data and analysis to diagnose issues. You can integrate Logging with OCI services such as
Streaming, Monitoring, OCI Functions, and Notifications. Logging uses the CloudEvents standard by the CNCF and uses CNCF Fluentd to
ingest logs from hundreds of sources.
• Logging Analytics: Machine learning-based cloud solution that monitors, aggregates, indexes, and analyzes all log data from your on-
premises and multicloud environments.
• Notifications: Highly available, low-latency publish and subscribe (pub/sub) service that sends alerts and messages to OCI Functions,
email, and message delivery partners, including Slack and PagerDuty.
• Operation Insights: Capacity planning tool that enables administrators to uncover performance issues, forecast consumption, and
plan capacity by using machine learning-based analytics on historical and SQL data. Use these capabilities to make data-driven
decisions to optimize resource use, proactively avoid outages, and improve performance.
• Resource Manager: Terraform-based cloud infrastructure automation tool that provides infrastructure-as-code service capability.
• Service Connector Hub: Helps cloud engineers manage and move data between OCI services and from OCI to third-party services.
• Stack Monitoring: Enables proactive monitoring of applications and their underlying stack, including application servers and
databases.
• Enterprise Manager: Provides comprehensive monitoring and management for Oracle Applications, Middleware, Database, and
Engineered Systems deployed in hybrid clouds.
• Governance: Provides a comprehensive array of services to help you optimize costs, maximize utilization, and ensure adherence with
corporate standards and legislative compliance for assets deployed in OCI.
8
Monitoring
9
Monitoring Procedure
The Monitoring service uses metrics to monitor resources and alarms to notify you when these metrics meet alarm-specified
triggers.
Metrics are emitted to the Monitoring service as raw data points, or timestamp-value pairs, along with dimensions and
metadata. Metrics come from a variety of sources:
Resource metrics are automatically posted by Oracle Cloud Infrastructure resources. For example, the Compute service posts
metrics for monitoring-enabled compute instances through the oci_computeagent namespace. One such metric is CPU utilization.
See Supported Services and Viewing Default Metric Charts.
Custom metrics published using the Monitoring API. Data is sent to new or existing metrics using Connector
Hub (with Monitoring as the target service for a connector).
You can transfer metrics from the Monitoring service using Connector Hub. For more information, see Creating a Connector with
a Monitoring Source.
Metric data posted to the Monitoring service is only presented to you or consumed by the Oracle Cloud Infrastructure features
that you enable to use metric data.
When you query a metric, the Monitoring service returns aggregated data according to the specified parameters. You can
specify a range (such as the last 24 hours), statistic, and interval. The Console displays one monitoring chart per metric for
selected resources. The aggregated data in each chart reflects the selected statistic and interval.
API requests can optionally filter by dimension and specify a resolution. API responses include the metric name along with its
source compartment and metric namespace.
You can feed the aggregated data into a visualization or graphing library.
Metric and alarm data is accessible from the Console, CLI, and API. For retention periods,.
The Alarms feature of the Monitoring service publishes alarm messages to configured destinations, such as topics
in Notifications and streams in Streaming.
10
Logging service
Enabling Logs in Oracle Cloud Infrastructure Logg
ing
11
Logging service
• The Oracle Cloud Infrastructure Logging service is a highly scalable and fully managed
single pane of glass for all the logs in your tenancy.
• Logging provides access to logs from Oracle Cloud Infrastructure resources.
• These logs include critical diagnostic information that describes how resources are
performing and being accessed.
• A log is a first-class Oracle Cloud Infrastructure resource that stores and captures log
events collected in a given context.
• For example, if you enable Flow Logs on a subnet, it has its dedicated log.
• Each log has an OCID and is stored in a log group. A log group is a collection of logs
stored in a compartment. Logs and log groups are searchable, actionable, and
transportable.
12
How Logging Works
• Add the policy to enable public logging for the Data Integration service.
• Add the policies to allow you to use OCI Logging with the Data Integration service.
18
Overview of Events
• Oracle Cloud Infrastructure services emit events, which are structured messages that indicate
changes in resources. Events (the messages, not the service) follow the Cloud Events industry-
standard format hosted by the Cloud Native Computing Foundation (CNCF). This standard allows
for interoperability between various cloud providers or on-premises systems and cloud providers.
• An event could be a create, read, update, or delete (CRUD) operation, a resource lifecycle state
change, or a system event impacting a resource. For example, an event can be emitted when a
backup completes or fails, or a file in an Object Storage bucket is added, updated, or deleted.
• Services emit events for resources or data. For example, Object Storage emits events for buckets
and objects. Services emit different types of events for resources, which are distinguished as event
types. Buckets and objects have event types of create, update, and delete, for example. Event
types are the changes that produce events by a given resource. For a list of services that produce
events and the event types that those services track, see Services that Produce Events
20
How Events Works Conti.
• You work with events by creating rules. Rules include a filter you define to specify events produced by the resources in
your tenancy. The filter is flexible:
• You can define filters that match only certain events or all events.
• You can define filters based on the way resources are tagged or the presence of specific values in attributes from the
event itself.
• Rules must also specify an action to trigger when the filter finds a matching event. Actions are responses you define for
event matches. You set up select Oracle Cloud Infrastructure services that the Events service has established as actions
(more on these select services follows). The resources for these services act as destinations for matching events. When
the filter in the rule finds a match, the Events service delivers the matching event to one or more of the destinations you
identified in the rule. The destination service that receives the event then processes the event in whatever manner you
define. This delivery provides automation in your environment.
• You can only deliver events to certain Oracle Cloud Infrastructure services with a rule. Use the following services to create
actions:
• Notifications
• Streaming
• Functions
21
22
Emit events and Rule events:
1.Emit Events:
•Emitting an event refers to creating and sending out an event from a rule agent. This action occurs in the action part of a
rule.
•When the rule agent is triggered and the specified conditions apply, it emits an event.
•The emitted event can then be processed by other agents that listen for this specific event type.
•You can specify the values for the new event instance using the where keyword. These values come from the attributes defined
in the event type.
•The timestamp of the new event is automatically set to the current time.
• It’s essential to avoid emitting events unconditionally in rules without proper conditions to prevent unintended
consequences.
• Example
•when a bike station query occurs then
• print "BikeStation query rule received query for station [" + the name of 'the bike station' + "]";
• emit a new bike station query response where
• the available bike stands is the available bike stands of 'the bike station',
• the available bikes is the available bikes of 'the bike station',
• the last update is the last update of 'the bike station',
• the rider is the rider of this bike station query;
23
• Rule Events:
• Rule events are events that trigger rules. These events can
be external events or events emitted from other rules.
• When a rule event occurs, it activates the associated rule(s)
for processing.
• Rule events can be modeled in tools like Event
Designer and imported into a rule project.
• Example:
• Suppose we have a rule agent referencing a customer entity. When a
customer event is received, a new coupon object is created for this
the amount is 100, the long description is the description of 'the event', the short description is "New coupon" to the coupons of 'the customer';
customer, and a new event is sent out:
emit a new coupon sent external where the customer is 'the customer';
25
Overview of Notifications
• Message
• The content that is published to a topic. Each message is delivered
at least once per subscription. Every message sent out as an email
contains a link to unsubscribe from the related topic.
• Friendly formatting: Select friendly formatting to increase the
human readability of messages.
• Notification
A configuration for sending messages, such as an alarm or event rule. Each message is sent
to subscriptions in the specified topic.
The following types of notifications are available:
• Contextual notification: Created from a quick start template or focused options that are
relevant to the given resource.
For instructions with a compute instance, see Setting Up Contextual Notifications for an Instance.
• Traditional notification: Created from a supported integration point.
Example scenarios for traditional notifications include automatically resizing VMs, sending alarm
messages to Slack and SMS, and filing Jira tickets for reminders.
27
Announcement Subscriptions
A contextual notification can include an alarm.
28
Event Rules
When triggered, an event rule sends an event message to the
configured topic. Notifications then deliver the message to
active subscriptions in that topic.
29
Connectors
A connector sends a connector message to the
configured topic. Notifications then deliver the
message to active subscriptions in that topic
30
Direct Publication
A user (or a service or app) sends a message to
the configured topic . Notifications then delivers
the message to active subscriptions in that
topic.
31
Creating Automation with Functions and Events
33
Overview of Data Integration
35
Data Integration service
• Before you get started, the administrator must satisfy connectivity
requirements so that the Data Integration service can establish a connection
to your data sources. The administrator then creates workspaces and gives
you access to them. You use workspaces to stay organized and easily manage
different data integration environments.
• For each data integration solution, you register data assets to identify the
source and target data sources to use. When you're ready to start designing a
data integration solution, Data Integration provides integration and data
loader tasks .
• To create an integration task, start with a data flow. The designer in Data
Integration is an easy-to-use graphical user interface where you can select
from different operators and visually build the data flow. It includes
validation and debug features to help you identify and correct potential
issues before running the task.
36
Data Integration service
37
Data Integration service
• When you create a data loader task, you specify your source data
asset, and then configure transformations to cleanse and process the
data as it is loaded into the target data asset.
• To execute a specific set of processes in a sequence, you create a
pipeline. Designing a pipeline is similar to building a data flow,
where you use operators to add the tasks and activities you want.
After building a pipeline, you create a pipeline task that uses the
pipeline.
• After you create tasks, you publish them to the default application
in Data Integration or to your own application . From an
application, you run tasks and monitor their progress and status. You
can also schedule tasks for automated runs.
38
The following is a list of concepts that would be helpful for
you to know when using the Data Integration service
Workspace
The container for all Data Integration resources, such as projects, folders, data assets, tasks, data flows, pipelines, applications,
and schedules,
associated with a data integration solution.
Project
A container for design-time resources, such as tasks or data flows and pipelines.
Folder
A container within a project or another folder to organize your design-time resources.
Data asset
Represents a data source such as a database, an object store, a file or document store containing the data source's metadata and
connection details.
Connection
Includes the necessary details to establish a connection to a data source. A connection is always associated to one data asset.
A data asset can have more than one connection.
Data entity
A collection of data, such as a database table or view, or a single logical file, with many attributes that describe its data.
Schema
A collection of data entities within a data asset.
39
Data flow Data Integration service
A design-time resource that defines the flow of data and any operations on the data between the source and target
systems.
To run a data flow, you add the data flow to an integration task.
Pipeline
A design-time resource for orchestrating tasks and activities in a sequence or in parallel to facilitate a process from start to
finish.
To run a pipeline, you add the pipeline to a pipeline task.
Operator
An operator represents an input source or output target, or a transformation in a data flow. In a pipeline, an operator
represents a
published task or an activity such as merge or end.
Parameter
A type of variable you can assign to an operator's details so that you can reuse the data flow or pipeline design with
different
resources and values. When you use parameters and set default values during design time, you can then change the
values later,
either in tasks that wrap the data flow or pipeline, or when you run the tasks.
Task
A design-time resource that specifies a set of actions to perform on data. You can create data loader tasks, integration
tasks for data flows,
and pipeline tasks for pipelines. You can also create SQL tasks and OCI Data Flow tasks. To run a task, you publish the task
into an
application to test it or roll it out to production.
Application 40
A container for runtime artifacts, such as tasks that have been published along with their dependencies. You use
applications for testing
and eventually roll them out into production.
Data Integration service
Patch
An update to an application. When you publish a single task or a group of tasks, or when you unpublish a task,
these activities are
logged as patches in an application. When you create an application(target) by making a copy of existing
resources in another
application(source), a patch is added to the application(target). In subsequent refreshes of the target application
by syncing with
changes from the source application, a patch is also created in the application(target).
Run
A runtime artifact that represents the execution of a task.
Schedule
A runtime resource that defines when and how often any published tasks should run automatically.
Task schedule
A runtime resource that is associated with a specific published task and an existing schedule to define when and
how often the
task should run automatically.
41
Overview of Data Catalog
44
Data catalog-Metrics
Terminology
Data Entity
A data entity is a collection of data such as a database table or view, or a single logical file. Typically, a data entity
has many
attributes that describe its data.
Filename Pattern
A filename pattern is a regular expression that's created to group multiple Object Storage files into a logical data
entity.
Logical Data Entity
A logical data entity is a group of Object Storage files that are derived by creating and assigning filename patterns
to a data asset.
Attribute
An attribute describes a data item with a name and data type. For example, a column in a table or a field in a file.
Custom Property
Custom property is created to enrich data catalog objects with business context.
45
Data catalog-Metrics
Terminology
• Oracle Cloud Infrastructure (OCI) Data Catalog is a powerful metadata
management service designed to assist data professionals in discovering data and
enhancing data governance within the Oracle ecosystem. Here are some key
points about OCI Data Catalog:
• Metadata Management: OCI Data Catalog acts as a centralized metadata
repository for all data sources within the Oracle ecosystem. It helps data
consumers discover relevant data assets and provides a unified view of technical
and business metadata.
• Data Discovery: Data analysts, data scientists, data engineers, and data stewards
can use OCI Data Catalog as a self-service environment to explore available data
across cloud sources. Whether it’s data lakes or warehouses, OCI Data Catalog
facilitates efficient data discovery
46
Data catalog-Metrics
Terminology
• Harvesting and Enrichment:
• Metadata Harvesting: OCI Data Catalog harvests metadata from various data sources,
including Oracle Cloud Infrastructure (OCI) and on-premises systems. This creates an inventory
of data assets, making it easier for data consumers to find the data they need for analytics.
• Automatic Harvesting: The service supports both on-demand and schedule-based automatic
harvesting, ensuring that the catalog remains up-to-date with the latest information.
• Support for On-Premises Sources: OCI Data Catalog extends its reach to systems in private
networks and on-premises, providing broader access to data
• Unified Metastore:
• Data engineers using OCI Data Flow service can leverage OCI Data Catalog’s metastore as a
central repository for metadata. This includes information about databases, tables, and
partitions represented by files in an OCI Object Storage data lake. The unified metastore
enhances semantic consistency and promotes collaboration
47
Data catalog-Metrics
Terminology
Namespace
A namespace is a container for Data Catalog metrics. The namespace identifies the service sending the metrics.
The namespace for Data Catalog is oci_datacatalog.
Metrics
Metrics are the fundamental concept in telemetry and monitoring. Metrics define a time-series set of datapoints.
Each metric is uniquely defined by a namespace, metric name, compartment identifier, and a set of one or more dimensions, and
a unit of measure.
Each datapoint has a timestamp, a value, and a count associated with it.
Dimensions
A dimension is a key-value pair that defines the characteristics associated with the metric; for example, resourceId, which is the
data catalog OCID.
Statistics
Statistics are metric data aggregations over specified periods of time. Aggregations are done using the namespace, metric name,
dimensions,
and the data point unit of measure within the time period specified.
Alarms
Alarms are used to automate operations monitoring and performance. An alarm tracks changes that occur over a specific time period and
performs one or more defined actions, based on the rules defined for the metric.
48
Data Science in OCI
• Oracle Cloud Infrastructure (OCI) provides a family of artificial intelligence (AI) and
machine learning (ML) services
• Data Science for the ML life cycle, you need to prepare your OCI environment and
workspace.
• Then you perform the following tasks:
• Access and collect data
• Prepare and explore data
• Train a model
• Evaluate and validate the model
• Deploy the model
• Manage and monitor the model
49
OCI's AI services
• OCI's AI services contains prebuilt ML models for specific uses. Some of the AI services are pretrained, and some you can
train with your own data. To use them, you simply call the API for the service and pass in data to be processed; the
service returns a result. There's no infrastructure to manage.
• Digital Assistant offers prebuilt skills and templates to create conversational experiences for business applications and
customers through text, chat, and voice interfaces.
• Language makes it possible to perform sophisticated text analysis at scale. The Language service includes pretrained
models for sentiment analysis, key phrase extraction, text classification, named entity recognition, and more.
• Speech uses automatic speech recognition (ASR) to convert speech to text. Built on the same AI models used for Digital
Assistant, developers can use time-tested acoustic and language models to provide highly accurate transcription for
audio or video files across many languages.
• Vision applies computer vision to analyze image-based content. Developers can easily integrate pretrained models into
their applications with APIs or custom-train models to meet their specific use cases. These models can be used to detect
visual anomalies in manufacturing, extract text from documents to automate business workflows, and tag items in images
to count products or shipments.
• Anomaly Detection enables developers to more easily build business-specific anomaly detection models that flag critical
incidents, resulting in faster time to detection and resolution. Specialized APIs and automated model selection simplify
training and deploying anomaly detection models to applications and operations.
50
OCI machine learning services
• OCI machine learning services are used primarily by data scientists to build, train, deploy, and
manage machine learning models. Data Science provides curated environments so data scientists
can access the open source tools they need to solve business problems faster.
• Data Science makes it possible to build, train, and manage ML models using open source Python,
with added capabilities for automated ML (AutoML), model evaluation, and model explanation.
• Data Labeling provides labeled datasets to more accurately train AI and ML models. Users can
assemble data, create and browse datasets, and apply labels to data records through user
interfaces and public APIs. The labeled datasets can be exported and used for model
development. When you build ML models that work on images, text, or speech, you need labeled
data that can be used to train the models.
• Data Flow provides a scalable environment for developers and data scientists to run Apache
Spark applications in batch execution, at scale. You can run applications written in any Spark
language to perform various data preparation tasks.
• Machine Learning in Oracle Database supports data exploration and preparation as well as
building and deploying ML models using SQL, R, Python, REST, AutoML, and no-code interfaces.
It includes more than 30 in-database algorithms that produce models in Oracle Database for
immediate use in applications. Build models quickly by simplifying and automating key elements
51
of the ML process.