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

Prometheus and Grafana support #1429

Closed
jrchatruc opened this issue Dec 6, 2024 · 0 comments · Fixed by #1518
Closed

Prometheus and Grafana support #1429

jrchatruc opened this issue Dec 6, 2024 · 0 comments · Fixed by #1518
Assignees

Comments

@jrchatruc
Copy link
Collaborator

Add a basic Prometheus + Grafana local setup to ethrex using docker compose; for now it should just show a simple metric:

  • Transactions per second

Reference:
https://docs.rs/prometheus/latest/prometheus/

@jrchatruc jrchatruc converted this from a draft issue Dec 6, 2024
@jrchatruc jrchatruc moved this to Todo in ethrex_l2 Dec 6, 2024
github-merge-queue bot pushed a commit that referenced this issue Jan 3, 2025
**Motivation**

We need a starting point to create dashboards with Grafana. Metrics are
essential to observe the behavior of the node.

**Description**

- Simple dashboard with a counter. Counts the transactions.
- We neeed an API with the `/metrics` endpoint → using axum for
fast development, we may want to create a simple API from scratch
without any crate.

- To test it out:
1. `cd crates/l2 && cp .env.example .env`
2. `make rm-db-l2 && make init`

- In a new terminal:
1. `cd crates/l2 && make cli`
2. `ethrex_l2 test load --path
<full_path>/ethrex/test_data/private_keys.txt -i 1`

- In the browser go to [http://localhost:3802/](http://localhost:3802/):
  - Login with `admin`/`admin`
- Go to Dashboards &rarr; open the `Ethrex - Transactions` dashboard,
the dashboard should show `172`. The previous cli's command sent 172
transactions.
  
Example output:


![image](https://github.com/user-attachments/assets/f585d850-490d-4133-8216-4f3d7e8c42ff)


Closes #1429

---------

Co-authored-by: Ivan Litteri <67517699+ilitteri@users.noreply.github.com>
@github-project-automation github-project-automation bot moved this from Todo to Done in ethrex_l2 Jan 3, 2025
@github-project-automation github-project-automation bot moved this to Done in ethrex_l1 Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants