Basic modeling concepts

Updated at:

UModel is a unified framework for modeling observable data. It provides a comprehensive set of syntax and concepts for building data models. This topic explains the core modeling concepts to help you understand how UModel represents IT systems.

Case study materials

Download the materials for this use case: umodel-enrich-dev.zip.

UModel is built on graph theory. It models an IT system as a directed graph in which nodes represent data or entities and links define the relationships between them. Every model consists of three primitives:

  • Field: The basic unit and property of data.

  • Node: An abstraction of data, entities, or storage.

  • Link: A directed connection that defines relationships between entities, and between entities and data.

Node

A Node is the fundamental building block in UModel. Nodes represent data collections, entities, or physical storage in the directed graph. There are three Node types:

  • EntitySet: A collection of entities that share the same properties.

  • TelemetryDataSet: A collection of observable data that shares the same properties.

  • Storage: An abstraction of a storage backend, such as Simple Log Service (SLS), Prometheus, or MySQL.

Definition of a set

A Set is a special type of Node — an abstract collection of data or entities that share the same properties. A Set is similar to a table in a relational database or a class in a programming language. It provides a unified schema for data of the same type.

Core set types

UModel defines two core Set types:

Type

What it represents

Typical use

EntitySet

A group of entities with the same properties

Hosts, services, users

TelemetryDataSet

A time-stamped collection of observable signals

Metrics, logs, traces, events, profiles

1. EntitySet

An EntitySet is a collection of entities that share the same properties. It models real-world objects — infrastructure, applications, or business objects — whose identity stays fixed throughout their lifetime.

Key features:

  • Entity lifecycle management: Tracks the first observed time, last observed time, and includes a keepalive mechanism.

  • Primary key definition: Uniquely identifies an entity using primary_key_fields.

  • Dynamic entity support: Supports both static storage and dynamic generation modes.

  • Relationship modeling: Establishes relationships with other EntitySets and TelemetryDataSets.

Core configuration fields:

spec:
  primary_key_fields: ["field1", "field2"]  # A list of primary key fields
  first_observed_time_field: "first_seen"   # The field for the first observed time
  last_observed_time_field: "last_seen"     # The field for the last observed time
  keep_alive_seconds: 3600                  # The keepalive duration in seconds
  dynamic: false                            # Specifies whether the entity is dynamic

Use cases:

  • IT infrastructure entities: Hosts, containers, and network devices.

  • Application layer entities: Services, interfaces, and database instances.

  • Business entities: Users, orders, and products.

  • Operations and Maintenance (O&M) entities: O&M engineers, code repositories, and deployment environments.

2. TelemetryDataSet

A TelemetryDataSet is a general representation of observable data. It is structurally similar to a database table but includes a time dimension and other features specific to observable data.

Core features:

  • Time dimension: All observable data includes a time field.

  • Field management: Supports classification and management of displayed fields, hidden fields, and tag fields.

  • Sorting support: Defines the default sorting field and direction.

  • Inheritance mechanism: Specific dataset types extend this base type.

Basic configuration:

spec:
  fields: []                    # A list of field definitions
  time_field: "timestamp"       # The time field
  name_fields: []               # The display name field
  tag_fields: []                # The tag field
  hidden_fields: []             # The hidden field
  ordered_fields: []            # The sorting field
  default_order: "asc"          # The default sorting direction

3. Specific dataset types

All specific dataset types extend TelemetryDataSet and add signal-specific fields. The following table shows the five types and their intended signals:

Type

Signal

Key additions

MetricSet

Metrics

Tag management, metric aggregation, query syntax (prom, spl, cms)

LogSet

Logs

Flexible field definitions and filtering

TraceSet

Distributed traces

Required trace_id, span_id, parent_span_id fields; configurable protocol

EventSet

Events

Alert events and system events

ProfileSet

Performance profiles

Multiple profiling protocols; default is pprof

MetricSet

  • Defines a collection of metrics.

  • Supports tag management and metric aggregation.

  • Supports query syntax types: prom, spl, and cms.

spec:
  labels:                       # The metric tag configuration
    keys: []                    # A list of tag fields
    dynamic: true               # Dynamic tag generation
  metrics: []                   # A list of detailed metrics
  query_type: "prom"            # The query syntax type

LogSet

  • Represents a collection of log data.

  • Inherits the base capabilities of TelemetryDataSet.

  • Supports flexible field definitions and filtering.

TraceSet

  • Defines distributed tracing data.

  • Requires the following trace fields: trace_id, span_id, and parent_span_id.

  • Supports different tracing protocols. The default is opentelemetry.

spec:
  trace_id_field: "traceId"         # The TraceID field name
  span_id_field: "spanId"           # The SpanID field name  
  parent_span_id_field: "parentSpanId"  # The parent SpanID field name
  protocol: "opentelemetry"         # The tracing protocol

EventSet

  • Defines a collection of event data.

  • Inherits the base capabilities of TelemetryDataSet.

  • Suited for scenarios such as alert events and system events.

ProfileSet

  • Defines performance profiling data.

  • Supports multiple profiling protocols. The default is pprof.

  • Suited for performance analysis scenarios such as CPU and memory profiling.

Definition of storage

Storage is an abstract concept in UModel that represents the physical storage of data. It decouples data modeling from specific storage implementations, supports multiple storage backends, and provides a unified storage interface.

Core storage types

  1. Simple Log Service (SLS) Logstore: Stores log data and provides log search and analysis capabilities.

  2. SLS MetricStore: Stores time series metrics and provides high-performance metric query and aggregation.

  3. Managed Service for Prometheus: Stores Prometheus metric data. Provides standard Prometheus metric storage and is compatible with Prometheus Query Language (PromQL) syntax.

  4. SLS EntityStore: The default storage backend for EntitySet and EntitySetLink data. Stores observable entities and relationship data, and provides graph query and relationship analysis capabilities.

A Link defines a directed relationship between two Sets. Links connect entities to other entities, entities to observable data, and data to physical storage — forming a complete topology of the observable system.

All Link types include the following general properties:

spec:
  src:                                # The source Set definition
    domain: "example.com"
    kind: "entity_set"
    name: "host"
  dest:                               # The destination Set definition  
    domain: "example.com"
    kind: "metric_set"
    name: "host_metrics"
  1. EntitySetLink: Defines the relationship between two EntitySets to build a topology between entities.

  2. DataLink: Defines the relationship between an EntitySet or Link and a DataSet to associate entities with observable data.

  3. StorageLink: Defines the relationship between an EntitySet or DataSet and Storage to decouple data modeling from physical storage.

Storage

Definition of storage

Storage is an abstract concept in UModel that represents the physical storage of data. It decouples data modeling from specific storage implementations, supports multiple storage backends, and provides a unified storage interface.

Core storage types

1. Simple Log Service Logstore

An SLS Logstore stores log data and provides log search and analysis capabilities.

Key features:

  • Region and project management: Supports storage configurations across multiple regions and projects.

  • Filter optimization: Supports multiple filtering methods: search_filter, spl_filter, and sql_filter.

  • View support: Supports Structured Process Language (SPL) and SQL views to generate data dynamically.

Core configuration:

spec:
  region: "cn-beijing"               # The storage region
  project: "my-project"              # The SLS project
  store: "app-logs"                  # The Logstore name
  search_filter: "*"                 # The search filter condition
  spl_filter: "status: 200"          # The SPL filter condition
  spl_view: "* | where status > 400" # The SPL view definition

2. SLS MetricStore

An SLS MetricStore stores time series metrics and provides high-performance metric query and aggregation.

Key features:

  • Time series optimization: Optimized storage and queries for time series data.

  • Multi-metric support: Supports multiple metrics in the same store.

  • High-concurrency queries: Supports large-scale concurrent metric queries.

Core configuration:

spec:
  region: "cn-beijing"               # The storage region
  project: "my-project"              # The SLS project
  store: "app-metrics"               # The MetricStore name

3. SLS EntityStore

An SLS EntityStore stores observable entities and relational data. It provides graph query and relationship analysis capabilities.

Key features:

  • Entity management: Optimized for entity data storage.

  • Relationship storage: Supports storing and querying relationships between entities.

  • Workspace isolation: Supports workspace isolation for multitenancy.

Core configuration:

spec:
  region: "cn-beijing"               # The storage region
  project: "my-project"              # The SLS project  
  workspace: "my-workspace"          # The workspace

4. Managed Service for Prometheus storage

Managed Service for Prometheus provides standard Prometheus metric storage and is compatible with PromQL syntax.

Key features:

  • Prometheus compatibility: Fully compatible with the Prometheus protocol and PromQL.

  • High availability architecture: Provides enterprise-grade high availability (HA) and disaster recovery capabilities.

  • SLS integration: Built on SLS storage to provide a unified observability experience.

Core configuration:

spec:
  region: "cn-beijing"               # The instance region
  instance_id: "prometheus-xxx"      # The Prometheus instance ID
  sls_project: "prometheus-project"  # The underlying SLS project
  sls_metricstore: "prometheus-data" # The underlying SLS MetricStore