GreptimeDB
Overview
GreptimeDB is an open-source, cloud-native time-series database for metrics, logs and events. It speaks SQL and PromQL and accepts ingestion over the InfluxDB, OpenTSDB and Prometheus protocols, so it fits into existing observability and IoT pipelines without changes to your collectors.
The SecureAnyCloud image installs GreptimeDB 1.1.1 in standalone mode and runs it as a dedicated greptimedb system user. Every listener binds to loopback behind an nginx reverse proxy on TCP 80 with HTTP Basic auth. All data persists on a dedicated Azure data disk, and the first boot of every VM generates a unique web password. The web Dashboard gives you an immediate SQL and PromQL query console with table and chart views.
What you get:
- GreptimeDB 1.1.1 (standalone) as the single greptime binary at
/usr/local/bin/greptime - The web Dashboard, the SQL-over-HTTP API and the PromQL API, fronted by nginx on
:80 - nginx HTTP Basic auth, with a per-VM password in a root-only file, because GreptimeDB's HTTP API has no built-in authentication
- A dedicated Azure data disk at
/var/lib/greptimedbthat holds all time-series data, separate from the OS disk and re-provisioned with every VM - SQL, PromQL and InfluxDB, OpenTSDB and Prometheus ingestion endpoints behind the same auth wall
greptimedb.serviceandnginx.serviceas systemd units, enabled and active- 24/7 SecureAnyCloud support
Prerequisites
- An active Azure subscription, an SSH key pair, and a virtual network and subnet in the target region.
- Standard_B2ms (2 vCPU, 8 GiB RAM) is a good starting point. Scale up for higher ingestion rates and cardinality.
- A network security group that allows inbound
22/tcpfrom your management network and80/tcpfor the Dashboard and API. For public exposure, front the service with TLS (see Enabling HTTPS).
Step 1 - Deploy from the Azure Marketplace
Sign in to the Azure Portal, choose Create a resource, search the Marketplace for GreptimeDB by SecureAnyCloud, and select Create. On the Basics tab, pick your subscription, resource group, region and size. Under Administrator account, choose SSH public key and paste your key. Under Inbound port rules, allow SSH (22) and HTTP (80). Review the dedicated data disk on the Disks tab, then select Review + create and Create.
Step 2 - Deploy from the Azure CLI
To deploy from the command line instead, run the following commands:
# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn sac1647283583153:greptimedb-ubuntu-24-04:default:latest
az vm create \
--resource-group <your-rg> \
--name greptimedb \
--image sac1647283583153:greptimedb-ubuntu-24-04:default:latest \
--size Standard_B2ms \
--admin-username azureuser \
--ssh-key-values ~/.ssh/id_ed25519.pub \
--vnet-name <your-vnet> --subnet <your-subnet> \
--public-ip-sku Standard
az vm open-port --resource-group <your-rg> --name greptimedb --port 80 --priority 1010Step 3 - Connect to your VM
Connect over SSH with your key pair:
ssh azureuser@<vm-public-ip>Step 4 - Confirm the services are running
Check that both services are active:
systemctl is-active greptimedb.service nginx.serviceBoth services report active. GreptimeDB starts in seconds and is immediately ready to accept SQL, PromQL and line-protocol traffic.
Step 5 - Retrieve your web password
The first boot of your VM generates a unique admin password and writes it to a root-only file:
sudo cat /root/greptimedb-credentials.txtThis file contains GREPTIMEDB_ADMIN_USER (admin) and GREPTIMEDB_ADMIN_PASSWORD, plus the URLs for the Dashboard and API. Store the password in a safe place.
Step 6 - Check the health endpoint
nginx serves an unauthenticated health endpoint for load balancers and probes:
curl -s http://localhost/healthThe endpoint returns ok.
Step 7 - Open the web Dashboard
Browse to http://<vm-public-ip>/dashboard/ and sign in as admin with the password from Step 5. The Dashboard's Query view is a SQL and PromQL console. Type a statement, select Run Query, and inspect the result as a table or a chart. The image ships an empty database ready for your data. The following screenshots show a sample sensor_readings table that you can recreate in Step 9.
Switch the result panel to Chart to render the same query as a time-series line chart:
The left Tables browser expands each table to its columns. DESC TABLE <name> returns the full schema, including each column's semantic type (TAG, FIELD or TIMESTAMP):
The Status page reports the running build, version and host:
Step 8 - Query from the command line
The SQL-over-HTTP API is available behind the same Basic auth. Confirm that GreptimeDB is serving and report its version:
curl -s -u admin:<GREPTIMEDB_ADMIN_PASSWORD> -X POST http://localhost/v1/sql --data-urlencode 'sql=SELECT version()'; echoThe response is JSON, and output[0].records.rows carries the running version (1.1.1). Every successful query returns an "output" array. Errors return a "code" and an "error" instead.
Step 9 - Create a table and query it
GreptimeDB tables need a TIMESTAMP TIME INDEX column. Create a small table, insert a row, and read it back over the SQL API. The example uses host_region because region is a reserved keyword:
PW=<GREPTIMEDB_ADMIN_PASSWORD> curl -s -u admin:$PW -X POST http://localhost/v1/sql --data-urlencode "sql=CREATE TABLE IF NOT EXISTS sensor_readings (host STRING, host_region STRING, temperature DOUBLE, humidity DOUBLE, ts TIMESTAMP TIME INDEX, PRIMARY KEY(host, host_region))"; echo curl -s -u admin:$PW -X POST http://localhost/v1/sql --data-urlencode "sql=INSERT INTO sensor_readings (host, host_region, temperature, humidity, ts) VALUES ('host-a','eastus',23.5,47.0,now())"; echo curl -s -u admin:$PW -X POST http://localhost/v1/sql --data-urlencode "sql=SELECT host, host_region, temperature, humidity, ts FROM sensor_readings ORDER BY ts DESC LIMIT 5"; echoEach call returns a JSON "output" array. The same table appears in the Dashboard's Tables browser and Query console.
Step 10 - Ingest with the InfluxDB line protocol
GreptimeDB accepts the InfluxDB v2 write API, so existing Telegraf and InfluxDB clients can ship data unchanged. Write a point and query it back. The table is created automatically on first write:
PW=<GREPTIMEDB_ADMIN_PASSWORD> curl -s -u admin:$PW -X POST 'http://localhost/v1/influxdb/api/v2/write?db=public' --data-binary 'weather,location=office temperature=21.3' curl -s -u admin:$PW -X POST http://localhost/v1/sql --data-urlencode 'sql=SELECT * FROM weather'; echoThe write returns HTTP 204, and the point is immediately queryable. GreptimeDB also exposes PromQL at /v1/promql, the Prometheus remote-write endpoint, the MySQL wire protocol on loopback 4002 and the Postgres wire protocol on loopback 4003. You can reach all of them from the VM itself or through an SSH tunnel.
Step 11 - Confirm data lives on the dedicated disk
All time-series data is stored on the dedicated Azure data disk, so it survives OS changes and can be resized independently:
findmnt /var/lib/greptimedbA separate Azure data disk, captured into the image and re-provisioned on every VM, backs the mount.
Enabling HTTPS
The nginx reverse proxy terminates plain HTTP on port 80. For public exposure, put a certificate in front of it. The simplest path is to add a DNS name for the VM and use the companion SecureAnyCloud nginx-ssl-certbot image as a TLS reverse proxy. Alternatively, install certbot and extend the existing nginx site with a listen 443 ssl; server block and your certificate paths. Keep GreptimeDB itself bound to loopback so that the only public surface is the authenticated, TLS-terminated proxy.
Maintenance
- Configuration: the standalone listeners and
--data-homeare set in/etc/default/greptimedb(theGT_ARGSline). Edit the file and runsudo systemctl restart greptimedbto apply changes. - Backups: snapshot the
/var/lib/greptimedbdata disk, or use GreptimeDB's export tooling to copy data to Azure Blob Storage. - Upgrades: replace
/usr/local/bin/greptimewith a newer release and restart the service. - Security patches: unattended-upgrades stays enabled, so the OS keeps receiving security updates automatically.
Support
SecureAnyCloud provides 24/7 expert support for this image. Contact sales@secureanycloud.com.
GreptimeDB is a trademark of Greptime Inc. This image is produced by SecureAnyCloud and is not affiliated with or endorsed by the GreptimeDB project. GreptimeDB is distributed under the Apache License 2.0.
Deploy on Azure
Launch GreptimeDB on Ubuntu 24.04 LTS on Azure with 24/7 support from SecureAnyCloud.
View this image
Need Help?
Our support team is available 24/7.
sales@secureanycloud.com
Overview
GreptimeDB is a fast, open-source, unified observability database for metrics, logs and traces. It speaks SQL and PromQL and ingests over the MySQL and PostgreSQL wire protocols, the Prometheus remote-write protocol, the Influx line protocol, OpenTelemetry and its own HTTP API. It stores everything in one columnar engine.
This image installs the GreptimeDB standalone binary under /opt/greptimedb and runs it as a dedicated, unprivileged greptime system account. A systemd service starts it on boot and restarts it on failure. The database lives at /var/lib/greptimedb, a dedicated EBS data volume that you can resize independently.
The open-source GreptimeDB dashboard has no built-in authentication, so the database HTTP server binds to the loopback interface only and is never exposed directly. An nginx reverse proxy publishes the web dashboard and the SQL, PromQL and ingest APIs on port 80 behind HTTP Basic authentication.
First boot generates the admin password, so two instances launched from the same Amazon Machine Image never share a password. The password is written to /root/greptimedb-credentials.txt with mode 0600, so only the root user can read it. First boot also seeds a small demo table so the dashboard has data to explore immediately.
Includes 24/7 SecureAnyCloud support.
Prerequisites
Before you deploy this image, you need:
- An Amazon Web Services account where you can launch EC2 instances
- IAM permissions to launch instances, create security groups, and subscribe to AWS Marketplace products
- An EC2 key pair in the target Region for SSH access to the instance
- A VPC and subnet in the target Region, with a security group that allows inbound port 22 from your management network and port 80 for the web dashboard and the read and write APIs
- The AWS CLI (version 2) installed locally, if you plan to deploy from the command line
Launch the instance from the AWS Marketplace
Sign in to the AWS Management Console, open the EC2 service, and select Launch instance. Under Application and OS Images, choose AWS Marketplace AMIs and search for GreptimeDB. Select the SecureAnyCloud listing, choose Select, and then choose Continue on the subscription summary.
Pick an instance type of t3.small or larger, and choose your EC2 key pair under Key pair (login). Under Network settings, select your VPC and subnet, and create or select a security group that opens port 22 from your management network and port 80 for the dashboard and the APIs. Leave the root volume at the default size or larger.
Select Launch instance. First-boot initialisation takes a few seconds after the instance state becomes Running and the status checks pass.
Launch the instance from the AWS CLI
The following command launches an instance from the SecureAnyCloud GreptimeDB Marketplace AMI into an existing subnet and security group. Replace <ami-id> with the AMI ID shown on the Marketplace listing, <key-name> with your EC2 key pair name, <subnet-id> with your subnet ID, and <security-group-id> with a security group that opens ports 22 and 80 as described above.
aws ec2 run-instances \
--image-id <ami-id> \
--instance-type t3.small \
--key-name <key-name> \
--subnet-id <subnet-id> \
--security-group-ids <security-group-id> \
--tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=greptimedb}]'When the instance reaches the Running state and its status checks pass, note its public IP address or DNS name from the EC2 console or with aws ec2 describe-instances.
Connect to your instance
Connect over SSH with your key pair and the login user for your operating system variant.
OS variant SSH login user
Ubuntu 24.04 ubuntu
ssh -i <key-name>.pem ubuntu@<public-ip>Retrieve the admin password
First boot generated a dashboard admin password that is unique to your instance. Read it as root:
sudo cat /root/greptimedb-credentials.txtThe file lists the dashboard URL, the admin user (admin) and the generated password, along with the API endpoint URLs. Store this password in a safe place.
Sign in to the web dashboard
nginx serves the GreptimeDB web dashboard on port 80 behind HTTP Basic authentication. In a browser, go to:
http://<instance-public-ip>/The browser prompts for credentials. Sign in as admin with the password from the credentials file. The bare root redirects to the dashboard, where the query console lets you run a SQL or PromQL statement and view the result as a table or chart.
The dashboard lists the database tables and the column schema of each table, so you can browse what is stored and inspect the time index and the column types.
The query console also supports ingestion and exploration. Write data with SQL INSERT statements or an ingest protocol, then query it straight back with SQL or PromQL.
Confirm GreptimeDB is running
Over SSH, confirm that the database and the nginx proxy are active and that the ports are listening:
sudo systemctl is-active greptimedb nginx
sudo ss -tlnp | grep -E ':(80|4000|4002|4003) 'Both services report active. The database HTTP server listens on 127.0.0.1:4000 (loopback only), the MySQL listener on 127.0.0.1:4002 and the PostgreSQL listener on 127.0.0.1:4003. nginx listens on port 80.
Run a query
You can query GreptimeDB through the dashboard, the HTTP SQL API, or any MySQL or PostgreSQL client. On the instance, you can run a SQL query over loopback without credentials:
curl -s -X POST http://127.0.0.1:4000/v1/sql \
-H 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'sql=SELECT host, cpu, mem FROM sac_demo ORDER BY ts DESC LIMIT 5'From outside the instance, send the same request to http://<instance-public-ip>/v1/sql with basic auth user admin and the generated password. List the tables in the database with:
curl -s -X POST http://127.0.0.1:4000/v1/sql \
-H 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'sql=SHOW TABLES'Ingest data
GreptimeDB accepts data over several protocols on port 80 through the authenticating proxy. Point your existing agents at the instance with the admin credentials:
- Prometheus remote write: set the
remote_writeURL in your Prometheus or vmagent configuration tohttp://<instance-public-ip>/v1/prometheus/write, with basic auth useradmin. - Influx line protocol: send data to
http://<instance-public-ip>/v1/influxdb/write. - OpenTelemetry: send OTLP metrics, logs and traces to the OpenTelemetry endpoints under
http://<instance-public-ip>/v1/otlp. - SQL: insert rows directly with
INSERT INTO ...over the HTTP SQL API, the MySQL client or the PostgreSQL client.
Insert a row over loopback to confirm ingestion works:
curl -s -X POST http://127.0.0.1:4000/v1/sql \
-H 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode "sql=INSERT INTO sac_demo (ts, host, cpu, mem) VALUES (now(), 'host-c', 42.0, 55.0)"Connect a MySQL or PostgreSQL client
GreptimeDB speaks the MySQL and PostgreSQL wire protocols. The listeners bind to loopback on the instance (ports 4002 and 4003), so connect from the instance itself or tunnel the port over SSH first. From the instance, run:
mysql -h 127.0.0.1 -P 4002 -u greptime public -e 'SELECT count(*) FROM sac_demo;'To reach the MySQL listener from your workstation, open an SSH tunnel and point your client at the local end:
ssh -i <key-name>.pem -L 4002:127.0.0.1:4002 ubuntu@<public-ip>Connect Grafana
Add GreptimeDB to Grafana with the official GreptimeDB data source plugin, or use the Prometheus data source for PromQL panels and the MySQL data source for SQL panels.
For the Prometheus data source, set the URL to http://<instance-public-ip>/v1/prometheus, enable Basic auth, and enter user admin with the generated password. GreptimeDB answers the Prometheus query API, so existing Prometheus dashboards work, and you can also write SQL panels against the same data.
The data volume
The database lives on a dedicated EBS volume mounted at /var/lib/greptimedb. This keeps the observability data off the operating system disk and lets you resize or snapshot it independently. Confirm the mount with:
df -h /var/lib/greptimedbTo grow the store, expand the EBS volume in the AWS console, then grow the filesystem on the instance by running sudo resize2fs on the underlying device. The storage data_home is set in /etc/greptimedb/standalone.toml.
Enable HTTPS
nginx serves the dashboard and APIs over plain HTTP on port 80. For production use, place them behind TLS. Obtain a certificate for your domain, for example a managed certificate on an Application Load Balancer in front of the instance, or Certbot installed on the instance.
Then configure nginx to listen on 443 with your certificate and proxy to 127.0.0.1:4000, exactly as the bundled site does for port 80, and keep the HTTP Basic authentication in place. Restrict the security group so that ports 80 and 443 are reachable only from the networks that ingest and query data.
Backup and maintenance
Back up the database by snapshotting the /var/lib/greptimedb EBS volume, which captures the entire store. Apply operating system security updates with sudo apt-get update && sudo apt-get upgrade, and reboot when a new kernel is installed. GreptimeDB and nginx start automatically on boot.
Support
SecureAnyCloud publishes and supports this image. Support covers deployment, ingestion protocol configuration, retention and compaction, SQL and PromQL queries, Grafana integration, TLS and storage tuning. Contact SecureAnyCloud through the support channel listed on the AWS Marketplace listing.
All product and company names are trademarks or registered trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.
Deploy on AWS
Launch GreptimeDB on AWS with 24/7 support from SecureAnyCloud.
View on Marketplace
Need Help?
Our support team is available 24/7.
sales@secureanycloud.com