Skip to content

Commit

Permalink
console API grafana dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
0xsergen committed Sep 26, 2024
1 parent 73bd778 commit 611e928
Show file tree
Hide file tree
Showing 6 changed files with 675 additions and 0 deletions.
35 changes: 35 additions & 0 deletions console-api/grafana-dashboard/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# QuickNode Grafana Dashboard Example

This folder contains all the necessary configuration files to set up a Grafana dashboard for monitoring your QuickNode RPC infrastructure using Prometheus. This example is part of the [How to Build a Grafana Dashboard to Monitor Your RPC Infrastructure](https://www.quicknode.com/guides/quicknode-products/console-api/how-to-build-a-grafana-dashboard-to-monitor-your-rpc-infrastructure) guide, which walks you through setting up a real-time monitoring system.

## Prerequisites

- **Docker Desktop**: Ensure you have **[Docker Desktop](https://www.docker.com/products/docker-desktop/)** installed and running. This setup uses Docker to launch Prometheus and Grafana easily.

- **QuickNode Account and API Key**: Make sure you have an [API key](https://dashboard.quicknode.com/api-keys) with appropriate permissions (`CONSOLE_REST`).

## Getting Started

1. Clone this repository:

```sh
git clone https://github.com/quiknode-labs/qn-guide-examples.git
```

2. Navigate to the `grafana-dashboard` folder:

```sh
cd qn-guide-examples/console-api/grafana-dashboard
```

3. Update the `prometheus.yaml` file in the `prometheus` folder with your QuickNode API key.

4. Launch Prometheus and Grafana using Docker Compose:

```sh
docker-compose up
```

5. Access Grafana by navigating to http://localhost:3000 in your web browser.

For more detailed instructions, please refer to the guide: [How to Build a Grafana Dashboard to Monitor Your RPC Infrastructure](https://www.quicknode.com/guides/quicknode-products/console-api/how-to-build-a-grafana-dashboard-to-monitor-your-rpc-infrastructure).
23 changes: 23 additions & 0 deletions console-api/grafana-dashboard/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
services:
prometheus:
image: prom/prometheus:latest
volumes:
- ./prometheus/prometheus.yaml:/etc/prometheus/prometheus.yaml
command:
- '--config.file=/etc/prometheus/prometheus.yaml'
ports:
- "9090:9090"

grafana:
image: grafana/grafana:latest
depends_on:
- prometheus
ports:
- "3000:3000"
volumes:
- ./grafana/provisioning/dashboards/main.yaml:/etc/grafana/provisioning/dashboards/main.yaml
- ./grafana/provisioning/datasources:/etc/grafana/provisioning/datasources
- ./grafana/dashboards:/var/lib/grafana/dashboards
environment:
- GF_SECURITY_ADMIN_PASSWORD=password

Loading

0 comments on commit 611e928

Please sign in to comment.