GreptimeTeam / greptimedb
- пятница, 18 ноября 2022 г. в 00:34:08
GreptimeDB, an open-source, cloud-native, distributed time-series database.
GreptimeDB is an open-source time-series database with a special focus on scalability, analytical capabilities and efficiency. It's designed to work on infrastructure of the cloud era, and users benefit from its elasticity and commodity storage.
Our core developers have been building time-series data platform for years. Based on their best-practices, GreptimeDB is born to give you:
To compile GreptimeDB from source, you'll need:
build-essential
on ubuntu and similar name on other platforms.rustup
, which will check our rust-toolchain
file and
install correct Rust version for you.protoc
is required for compiling .proto
files. protobuf
is
available from major package manager on macos and linux distributions. You can
find an installation instructions
here.A docker image with necessary dependencies is provided:
docker build --network host -f docker/Dockerfile -t greptimedb .
Start GreptimeDB from source code, in standalone mode:
cargo run -- standalone start
Or if you built from docker:
docker run -p 4002:4002 -v "$(pwd):/tmp/greptimedb" greptime/greptimedb standalone start
For more startup options, greptimedb's distributed mode and information about Kubernetes deployment, check our docs.
Connect to GreptimeDB via standard MySQL client:
# The standalone instance listen on port 4002 by default.
mysql -h 127.0.0.1 -P 4002
Create table:
CREATE TABLE monitor (
host STRING,
ts TIMESTAMP,
cpu DOUBLE DEFAULT 0,
memory DOUBLE,
TIME INDEX (ts),
PRIMARY KEY(host)) ENGINE=mito WITH(regions=1);
Insert some data:
INSERT INTO monitor(host, cpu, memory, ts) VALUES ('host1', 66.6, 1024, 1660897955000);
INSERT INTO monitor(host, cpu, memory, ts) VALUES ('host2', 77.7, 2048, 1660897956000);
INSERT INTO monitor(host, cpu, memory, ts) VALUES ('host3', 88.8, 4096, 1660897957000);
Query the data:
SELECT * FROM monitor;
+-------+---------------------+------+--------+
| host | ts | cpu | memory |
+-------+---------------------+------+--------+
| host1 | 2022-08-19 08:32:35 | 66.6 | 1024 |
| host2 | 2022-08-19 08:32:36 | 77.7 | 2048 |
| host3 | 2022-08-19 08:32:37 | 88.8 | 4096 |
+-------+---------------------+------+--------+
3 rows in set (0.01 sec)
You can always cleanup test database by removing /tmp/greptimedb
.
gtctl
: the command-line tool for
Kubernetes deploymentThis project is in its early stage and under heavy development. We move fast and break things. Benchmark on development branch may not represent its potential performance. We release pre-built binaries constantly for functional evaluation. Do not use it in production at the moment.
Our core team is thrilled too see you participate in any ways you like. When you are stuck, try to ask for help by filling an issue with a detailed description of what you were trying to do and what went wrong. If you have any questions or if you would like to get involved in our community, please check out:
In addition, you may:
GreptimeDB uses the Apache 2.0 license to strike a balance between open contributions and allowing you to use the software however you want.
Please refer to contribution guidelines for more information.