Skip to content

Latest commit

 

History

History
85 lines (63 loc) · 2.34 KB

File metadata and controls

85 lines (63 loc) · 2.34 KB

Model Elements

中文:Model Elements

UModel elements are versioned model definitions. They define the object graph before runtime entity and relation records are written.

Element Envelope

Authoring files use a common YAML shape:

kind: entity_set
schema:
  url: "umodel.aliyun.com"
  version: "v0.1.0"
metadata:
  name: "devops.service"
  domain: devops
spec:
  fields: []

Important fields:

Field Meaning
kind Model kind, such as entity_set, metric_set, data_link, or sls_metricstore.
schema.version Schema version used to validate this element.
metadata.name Stable name inside the domain.
metadata.domain Semantic namespace.
metadata.display_name Human-facing bilingual name when available.
spec Kind-specific content.

Core Kinds

Category Kinds
Entities entity_set
Datasets metric_set, log_set, trace_set, event_set, profile_set, runbook_set
Links data_link, entity_set_link, storage_link, runbook_link, entity_source_link, explorer_link
Storage sls_logstore, sls_metricstore, sls_entitystore, aliyun_prometheus, external_storage

Lifecycle

flowchart LR
  Author["Author YAML"]
  Validate["Validate"]
  Import["Import to workspace"]
  Query["Read through .umodel"]
  Use["Use in Query / UI / Agent"]

  Author --> Validate
  Validate --> Import
  Import --> Query
  Query --> Use
Loading

Import Paths

Bundled sample import:

curl -X POST http://localhost:8080/api/v1/samples/demo/multi-domain-quickstart:import \
  -H 'Content-Type: application/json' \
  -d '{}'

Import your own model pack with the CLI:

go run ./cmd/umctl --addr http://localhost:8080 umodel import demo examples/quickstart-multidomain

Validation And References

Validation checks the element shape before writing it to GraphStore. Schema source files live under schemas/, and generated reference HTML lives under docs/html, docs/html_en, and docs/html_cn.

Related Concepts