Grafana

Sample

Prerequisites

Before proceeding, ensure you have:


Step 1: Change Node Configuration

Modify the configuration file to enable Prometheus.

Find and update the [instrumentation] section:

Then restart your node to apply the changes.

The Prometheus endpoint will now be available on port 26660.


Step 2: Setup Cosmos Exporter

cosmos-exporter collects validator metrics.

1. Download and Install

2. Create a Systemd Service

Insert the following configuration (update the gRPC endpoint and listening port 9300 accordingly):

3. Enable and Start the Service

The Cosmos Exporter service is now running on port 9300.


Step 3: Update Prometheus Configuration

Edit your Prometheus configuration file:

Add the following scrape jobs:

This configuration:

  • Scrapes your node's metrics from port 26660.

  • Collects Cosmos Exporter metrics from port 9300.

  • Separates all validators from your validator for detailed monitoring.

  • Change oraivaloper1000 to your own validator address.

Restart Prometheus to apply the changes:


Step 4: Configure Grafana

1. Access Grafana

Open your browser and go to grafana webUI.

2. Import the Cosmos Validator Dashboard

  1. Go to DashboardsImport.

  2. Enter the Dashboard ID: 15991.

  3. Select Prometheus as the data source.

  4. Click Import.

Your Cosmos validator monitoring dashboard is now live! 🎉


Step 5: Summary of Steps

Step
Task
Description

1

Enable Prometheus in Node

Exposes metrics on port 26660

2

Install Cosmos Exporter

Collects validator data on port 9300

3

Update Prometheus Config

Scrapes both 26660 and 9300

4

Setup Grafana Dashboard

Displays metrics with Dashboard ID: 15991

Ports Used

Service
Port
Purpose

Cosmos Node Prometheus

26660

Exposes node metrics

Cosmos Exporter

9300

Validator-specific metrics

Prometheus

9090

Metric collection

Grafana

3000

Dashboard UI


Conclusion

By following this guide, you’ve successfully set up monitoring for your Cosmos validator node using Grafana, Prometheus, and Cosmos Exporter.

Last tip: Monitoring stack needs to be deployed on seperate machine to be able to notify in case if validator goes down! To run monitoring stack you dont need beastly server with multiple cores. It will be more than enough to run it on smallest available vps (example: Ubuntu 22.04 / 1 VCPU / 2 GB RAM / 20 GB SSD)

Last updated

Was this helpful?