Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: adding Grafana config for cluster monitor #3781

Merged
merged 3 commits into from
Apr 30, 2024

Conversation

shuiyisong
Copy link
Contributor

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

What's changed and what's your intention?

This pr mainly adds a new Grafana config json for cluster monitoring. The result should look like following

image

Checkout grafana/README.md for more detail.

Minimal reproduce steps

  1. start a GreptimeDB cluster on local machine (including a running etcd)
  2. start a Prometheus instance. Config file are shown below.
  3. start a Grafana instance.
  4. log in to Grafana and config Prometheus data source using http://localhost:9090 (default address for Prometheus)
  5. create a new dashboard and import grafana/greptimedb-cluster.json

Prometheus config file

global:
  scrape_interval: 5s
  evaluation_interval: 5s

scrape_configs:
  - job_name: metasrv
    static_configs:
    - targets: ['<host>:<ip>'] # replace with metasrv's host and ip
      labels:
        greptime_pod: metasrv

  - job_name: datanode
    static_configs:
    - targets: ['<host>:<ip>'] # replace with datanode-1's host and ip
      labels:
        greptime_pod: datanode1
    - targets: ['<host>:<ip>'] # replace with datanode-2's host and ip
      labels:
        greptime_pod: datanode2
    - targets: ['<host>:<ip>'] # replace with datanode-3's host and ip
      labels:
        greptime_pod: datanode3

  - job_name: frontend
    static_configs:
    - targets: ['<host>:<ip>'] # replace with frontend's host and ip
      labels:
        greptime_pod: frontend

  - job_name: prometheus
    static_configs:
      - targets: ['localhost:9090']

# this config is merely for writing data into GreptimeDB to trigger metrics changing
remote_write:
  - url: http://localhost:4904/v1/prometheus/write

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR does not require documentation updates.

@shuiyisong shuiyisong requested a review from a team as a code owner April 23, 2024 11:35
@github-actions github-actions bot added the docs-not-required This change does not impact docs. label Apr 23, 2024
Copy link
Contributor

@evenyag evenyag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Me: Looks...... 🫢 Grafana: Good to me

Copy link
Contributor

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@tisonkun tisonkun added this pull request to the merge queue Apr 30, 2024
Merged via the queue into GreptimeTeam:main with commit 863ee60 Apr 30, 2024
11 checks passed
@shuiyisong shuiyisong deleted the chore/grafana branch May 30, 2024 02:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-not-required This change does not impact docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants