Skip to content

Latest commit

 

History

History
87 lines (52 loc) · 3.12 KB

README.md

File metadata and controls

87 lines (52 loc) · 3.12 KB

Use GreptimeDB to store and visualize data from Node Exporter

Rationales

GreptimeDB implements APIs for both Prometheus remote read and remote write. You can use GreptimeDB as a Prometheus backend.

Meanwhile, GreptimeDB supports PromQL as its query interface, so that you can use GreptimeDB as a drop-in replacement for Prometheus.

This demo showcases how to run the famous Node Exporter integrations with GreptimeDB as the storage backend.

Step 1: Set up GreptimeDB service

First of all, let's get a free GreptimeDB service:

  1. Obtain a free GreptimeDB service from GreptimeCloud.
  2. Click the "Connection Information" button and find the connection string.
  3. Create a greptime.env by copy the greptime.env.sample and fill with your connection information.
GREPTIME_SCHEME=https
GREPTIME_PORT=443

## Fill with your connection information
GREPTIME_HOST=
GREPTIME_DB=
GREPTIME_USERNAME=
GREPTIME_PASSWORD=

Connection

Step 2: Start Node Exporter and Prometheus with Docker Compose

We build a docker-compose file to start Prometheus node exporter and Prometheus with just one call. Make sure you have docker and docker-compose installed. Run:

docker compose up

Step 3: Visualize on GreptimeCloud Dashboard

You can visualize the node mertics from the Web Dashboard:

Portal

Configure Workbench Node Exporter Full

The "Node Exporter Full" dashboard template will give you the same charts as the Grafana Node Exporter Dashboard.

Node Exporter Full Charts

Bonus: Visualize with Grafana Dashboard

Since GreptimeDB can be used as a drop-in replacement of Prometheus, it's also possible to visualize node metrics with Grafana Dashboard with the Prometheus plugin, as if GreptimeDB is a Prometheus instance.

First, start a Grafana container:

docker run -d --name=grafana -p 3000:3000 grafana/grafana

Open http://localhost:3000/ at browser and log in with the default credential: both username and password are admin.

You should add GreptimeDB as an instance of Prometheus data source. Click "Connections", "Data sources", and then "Add new data source":

Grafana Data Source

Choose "Prometheus" and add the necessary configuration:

Grafana Connection Info

Click "Save & Test" at the button to ensure the connection is correctly set up.

Then, go the "Dashboard" page and click "Create Dashboard":

Grafana Create Dashboard

Choose "Import a dashboard" and then load the Node Exporter Full public template (https://grafana.com/grafana/dashboards/1860-node-exporter-full/):

Grafana Import Dashboard

Use the data source you just registered, and click "Import". You will be redirected to the final dashboard:

Grafana Final Dashboard