-
Notifications
You must be signed in to change notification settings - Fork 2
Add Prometheus/Grafana observability for DynamoDB and Raft and normal… #340
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
base: main
Are you sure you want to change the base?
Changes from all commits
9753357
a7d7a1a
ea78680
3879c19
19110e0
98851e3
b956105
e3f90e2
e119e61
2111cfe
e8a0c49
a192934
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,6 +30,31 @@ Deployment/runbook documents: | |
|
|
||
| - `docs/docker_multinode_manual_run.md` (manual `docker run`, 4-5 node cluster on multiple VMs, no docker compose) | ||
|
|
||
| ## Metrics and Grafana | ||
|
|
||
| Elastickv now exposes Prometheus metrics on `--metricsAddress` (default: `localhost:9090` in `main.go`, `:9090` in `cmd/server/demo.go`). | ||
|
|
||
| The exported metrics cover: | ||
|
|
||
| - DynamoDB-compatible API request rate, success/error split, latency, request/response size, and per-table read/write item counts | ||
| - Raft local state, leader identity, current members, commit/applied index, and leader contact lag | ||
|
|
||
| Provisioned monitoring assets live under: | ||
|
|
||
| - `monitoring/prometheus/prometheus.yml` | ||
| - `monitoring/grafana/dashboards/elastickv-cluster-overview.json` | ||
| - `monitoring/grafana/provisioning/` | ||
| - `monitoring/docker-compose.yml` | ||
|
|
||
| To scrape a multi-node deployment, bind `--metricsAddress` to each node's private IP, for example `--metricsAddress "10.0.0.11:9090"`. | ||
|
|
||
|
Comment on lines
+49
to
+50
|
||
| For the local 3-node demo, start Grafana and Prometheus with: | ||
|
|
||
| ```bash | ||
| cd monitoring | ||
| docker compose up -d | ||
| ``` | ||
|
|
||
|
|
||
| ## Example Usage | ||
|
|
||
|
|
@@ -41,6 +66,16 @@ To start the server, use the following command: | |
| go run cmd/server/demo.go | ||
| ``` | ||
|
|
||
| To expose metrics on a dedicated port: | ||
| ```bash | ||
| go run . \ | ||
| --address "127.0.0.1:50051" \ | ||
| --redisAddress "127.0.0.1:6379" \ | ||
| --dynamoAddress "127.0.0.1:8000" \ | ||
| --metricsAddress "127.0.0.1:9090" \ | ||
| --raftId "n1" | ||
| ``` | ||
|
|
||
| ### Starting the Client | ||
|
|
||
| To start the client, use this command: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
README states the demo default for --metricsAddress is ":9090", but cmd/server/demo.go actually defaults to "127.0.0.1:9090". Update the README to match the real default (or change the flag default to match the README) to avoid confusing operators.