CNOSDB Documentation
website·Indexed 32 days ago
https://docs.cnosdb.comDocumentation for CNOSDB versions 2.3.x and 2.4.x, featuring a comprehensive SQL function reference including aggregate, window, string, math, date/time, geospatial, and quality functions. It also covers core architectural concepts, the Raft replication algorithm, and performance comparisons with InfluxDB and OpenTSDB.
What's inside CNOSDB
- CnosDB Alarm Management (available only in the Enterprise Edition) allows users to monitor time-series data by executing scheduled SQL queries. If the query results meet specified thresholds, notifications are sent to configured endpoints. All triggered alarms and notifications are recorded within CnosDB, and alarm rules are persisted in a JSON file. Currently, Slack and Twitter are supported as notification endpoints.
Overview of CnosDB Subscription replication
CnosDB subscriptions (Enterprise Edition only) enable the replication of data from a local endpoint to remote endpoints, such as another CnosDB instance or Telegraf. This is achieved via traffic replication. Supported traffic for distribution includes requests to
/api/v1/writeandINSERTstatements within/api/v1/sql.Important: Before distributing data to a remote CnosDB instance, the target tables must be created in advance to prevent data loss.
Overview of CnosDB development and connectivity
CnosDB supports integration with common development languages including Go, Rust, Java, and Python. For standardized connectivity and data exchange, it supports ODBC, JDBC, and Arrow Flight SQL.Overview of data migration using DataX for CnosDB
CnosDB supports data migration from heterogeneous data sources using DataX, an open-source offline data synchronization platform. DataX operates using a Reader plugin to extract data from the source and a Writer plugin to write data to the destination. To import data into CnosDB, users should utilize theCnosDBWriterplugin within a DataX JSON configuration file.{ "job": { "content": [ { "reader": { "/* Reader Configuration */" }, "writer": { "/* Writer Configuration */" } } ], "setting": { "/* Other settings */" } } }Overview of CnosDB System Views
CnosDB provides three primary system schemas to monitor cluster status, schema information, and resource usage:
cluster_schema: Stores global cluster-level information, including tenants and users.information_schema: Stores tenant-specific information, including databases, tables, columns, roles, and privileges.usage_schema: Stores system usage and performance metrics, such as coordinator data flow, HTTP query durations, and vnode disk storage.
Overview of CnosDB Subscription Management
CnosDB subscriptions allow data to be written from a local endpoint to remote endpoints (e.g., another CnosDB instance or Telegraf) using traffic replication. This feature is only available in the Enterprise Edition.
Supported distributed traffic includes:
/api/v1/writeINSERToperations in/api/v1/sql
Important: You must create the target table in the destination CnosDB instance before distributing data to prevent data loss.
Overview of Arrow Flight SQL
Arrow Flight SQL is a protocol for interacting with SQL databases using the Arrow in-memory format and the Flight RPC framework. It provides functionality similar to JDBC and ODBC (such as executing queries and prepared statements) but offers better performance by communicating without data transformation and supporting parallel data access. It can be used as a wired protocol/driver implementation for JDBC/ODBC drivers.Overview of CnosDB Distributed Time-Series Database
CnosDB is a high-performance, high-compression, and easy-to-use open-source distributed time-series database. It is specifically optimized for time-series data characteristics (structured data, lack of transactions, infrequent deletes/updates, and high write-to-read ratios).
Key capabilities include:
- High Performance: Solves time-series cardinality explosion (theoretically unlimited series), supports aggregation queries along timelines (fixed-interval windows, enumeration-based windows, and variable-interval windows), and features configurable caching for fast access to the latest data.
- Ease of Use: Supports standard SQL, schemaless writes, and historical data backfilling (including out-of-order writes). It is designed for seamless integration with third-party tool ecosystems.
- Cloud Native Architecture: Features a native distributed design with data sharding, partitioning, and separation of storage and compute. It supports Kubernetes deployment, multi-tenancy with role-based access control (RBAC), a stateless compute layer, and a horizontally scalable storage layer for increased capacity.
Overview of Cloud Native Time Series Databases (DBaaS)
A Cloud-native time series database is a Database as a Service (DBaaS) where construction, deployment, and delivery are handled via a cloud platform. It allows organizations and applications to store, manage, and retrieve data through a scalable and reliable cloud-based solution. Key characteristics include deployment in non-virtualized environments to maximize underlying hardware availability and the use of cloud-native tools for automated disaster recovery and high availability.Overview of CnosDB Alert Management
CnosDB Alert Management (available only in the Enterprise Edition) allows users to monitor time-series data, set alert rules, define notification methods, and manage notification groups. Thecnos-alertcomponent periodically executes SQL queries against CnosDB; if the results exceed defined thresholds, notifications are sent to specified endpoints (currently supporting Slack and Twitter). All alert triggers and notifications are recorded back into CnosDB.Overview of CnosDB Alarm Management
CnosDB provides alarm management capabilities (available only in the Enterprise Edition) that allow users to view alarm information, set alarm rules, configure notification methods, and manage notification groups. Thecnos-alertcomponent implements this by executing SQL queries at regular intervals, comparing results against defined thresholds, and sending notifications to terminals such as Slack and Twitter.Overview of data migration using DataX for CnosDB
CnosDB supports data migration from heterogeneous data sources using DataX, an open-source offline data synchronization platform. DataX operates using a Reader plugin to extract data from a source and a Writer plugin to write data to the destination. CnosDB provides theCnosDBWriterplugin to facilitate the import of data into CnosDB.{ "job": { "content": [ { "reader": { /* Reader Configuration */ }, "writer": { /* Writer Configuration */ } } ], "setting": { /* Other settings */ } } }