Back to all posts

COSMOSMON: A Monitor for the COSMOS Node

We use Prometheus and Grafana to display the basic on-chain data about the validating nodes on the COSMOS network. Both the exporter and the template (Prometheus/Grafana) are public. We also plan to expand the number of chain-specific metrics in the future, so that we can provide a more detailed and, thus, complete picture of the network. Public contributions are welcomed!

undefined

Requirements:

  1. Node exporter
  2. Prometheus
  3. Grafana

Step 1: Start Node Exporter with collector.textfile.directory

Create node_exporter user:

sudo useradd --no-create-home --shell /bin/false node_exporter

Create directory:

sudo mkdir -p /var/lib/node_exporter/textfile_collector

sudo chown node_exporter:node_exporter /var/lib/node_exporter/textfile_collector

Create cosmos_metrics.prom

sudo touch /var/lib/node_exporter/textfile_collector/cosmos_metrics.prom 
sudo chmod o+w /var/lib/node_exporter/textfile_collector/cosmos_metrics.prom

Create a service file:

vim /etc/systemd/system/node_exporter.service 
[Unit]
Description=Node Exporter
Wants=network-online.target
After=network-online.target

[Service]
User=node_exporter
Group=node_exporter
Type=simple
ExecStart=/usr/local/bin/node_exporter --collector.textfile.directory /var/lib/node_exporter/textfile_collector

[Install]
WantedBy=multi-user.target

Step 2: Start script cosmos_exporter.sh

The script collects metrics to a text file. You need to set variables in cosmos_exporter.sh. For example, you can use the supervisor to start this script.
To check Node Exporter use curl http://localhost:9100/metrics.

Step 3: Import template to Grafana

You can import template cosmos_dashboard.json to Grafana using standard import procedure.

***

Follow news and updates from Everstake by subscribing to the newsletter on our website and join the discussion on our social channels through the links below.
Website: everstake.one
Twitter: @Everstake_pool
Telegram: @Everstake_chat
Facebook: fb.me/everstake.one
Reddit: /r/Everstake/
Medium: medium.com/everstake

Previous post Next post