mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-26 23:58:46 -05:00
docs: add cross-platform Prometheus & Grafana installation guidance (#15703)
Co-authored-by: Alexey Shekhirin <5773434+shekhirin@users.noreply.github.com>
This commit is contained in:
@@ -26,9 +26,11 @@ We're finally getting somewhere! As a final step, though, wouldn't it be great t
|
||||
|
||||
We're going to use Prometheus to scrape the metrics from our node, and use Grafana to on a dashboard.
|
||||
|
||||
Let's begin by installing both Prometheus and Grafana, which one can do with e.g. Homebrew:
|
||||
Let's begin by installing both Prometheus and Grafana:
|
||||
|
||||
<!-- TODO: Provide cross-platform guidance -->
|
||||
### macOS
|
||||
|
||||
Using Homebrew:
|
||||
|
||||
```bash
|
||||
brew update
|
||||
@@ -36,11 +38,70 @@ brew install prometheus
|
||||
brew install grafana
|
||||
```
|
||||
|
||||
### Linux
|
||||
|
||||
#### Debian/Ubuntu
|
||||
```bash
|
||||
# Install Prometheus
|
||||
# Visit https://prometheus.io/download/ for the latest version
|
||||
PROM_VERSION=$(curl -s https://api.github.com/repos/prometheus/prometheus/releases/latest | grep tag_name | cut -d '"' -f 4 | cut -c 2-)
|
||||
wget https://github.com/prometheus/prometheus/releases/download/v${PROM_VERSION}/prometheus-${PROM_VERSION}.linux-amd64.tar.gz
|
||||
tar xvfz prometheus-*.tar.gz
|
||||
cd prometheus-*
|
||||
|
||||
# Install Grafana
|
||||
sudo apt-get install -y apt-transport-https software-properties-common
|
||||
wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add -
|
||||
echo "deb https://packages.grafana.com/oss/deb stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
|
||||
sudo apt-get update
|
||||
sudo apt-get install grafana
|
||||
```
|
||||
|
||||
#### Fedora/RHEL/CentOS
|
||||
```bash
|
||||
# Install Prometheus
|
||||
# Visit https://prometheus.io/download/ for the latest version
|
||||
PROM_VERSION=$(curl -s https://api.github.com/repos/prometheus/prometheus/releases/latest | grep tag_name | cut -d '"' -f 4 | cut -c 2-)
|
||||
wget https://github.com/prometheus/prometheus/releases/download/v${PROM_VERSION}/prometheus-${PROM_VERSION}.linux-amd64.tar.gz
|
||||
tar xvfz prometheus-*.tar.gz
|
||||
cd prometheus-*
|
||||
|
||||
# Install Grafana
|
||||
# Visit https://grafana.com/grafana/download for the latest version
|
||||
sudo dnf install -y https://dl.grafana.com/oss/release/grafana-latest-1.x86_64.rpm
|
||||
```
|
||||
|
||||
### Windows
|
||||
|
||||
#### Using Chocolatey
|
||||
```powershell
|
||||
choco install prometheus
|
||||
choco install grafana
|
||||
```
|
||||
|
||||
#### Manual installation
|
||||
1. Download the latest Prometheus from [prometheus.io/download](https://prometheus.io/download/)
|
||||
- Select the Windows binary (.zip) for your architecture (typically windows-amd64)
|
||||
2. Download the latest Grafana from [grafana.com/grafana/download](https://grafana.com/grafana/download)
|
||||
- Choose the Windows installer (.msi) or standalone version
|
||||
3. Extract Prometheus to a location of your choice (e.g., `C:\prometheus`)
|
||||
4. Install Grafana by running the installer or extracting the standalone version
|
||||
5. Configure Prometheus and Grafana to run as services if needed
|
||||
|
||||
Then, kick off the Prometheus and Grafana services:
|
||||
|
||||
```bash
|
||||
# For macOS
|
||||
brew services start prometheus
|
||||
brew services start grafana
|
||||
|
||||
# For Linux (systemd-based distributions)
|
||||
sudo systemctl start prometheus
|
||||
sudo systemctl start grafana-server
|
||||
|
||||
# For Windows (if installed as services)
|
||||
Start-Service prometheus
|
||||
Start-Service grafana
|
||||
```
|
||||
|
||||
This will start a Prometheus service which [by default scrapes itself about the current instance](https://prometheus.io/docs/introduction/first_steps/#:~:text=The%20job%20contains%20a%20single,%3A%2F%2Flocalhost%3A9090%2Fmetrics.). So you'll need to change its config to hit your Reth nodes metrics endpoint at `localhost:9001` which you set using the `--metrics` flag.
|
||||
|
||||
Reference in New Issue
Block a user