Monitoring of a consensus node & validator for the Celestia blockchain, with Prometheus and Grafana. We use a separate server for Prometheus and Grafana. You can rent a VPS with minimal specifications
Prometheus is an open source database management system written in Go. An interesting feature of Prometheus is that it itself pulls metrics from a given set of services. Due to this, Prometheus cannot clog any data queues, which means monitoring will never become a system bottleneck.
Before you start, you need to make sure that prometheus is enabled in your validator node by checking the value of the variable in:
.celestia-app/config/config.toml
Specify your listening port (26660) and be sure to open it in your Firewall.
For the configuration to take effect, you need to restart your node.
Port 9090 can be replaced with your own (for example 8080).
for i inrulesrules.dfiles_sd; dosudochown-RPrometheus:Prometheus/etc/prometheus/${i}; donefor i inrulesrules.dfiles_sd; dosudochmod-R775/etc/prometheus/${i}; donesudochown-RPrometheus:Prometheus/var/lib/prometheus/
Now we can access the Prometheus interface by accessing the ip of the server where we have installed it: (ip node Prometheus):9090/status
In the future, you can add additional information about your other servers to prometheus.yml in order to monitor several servers at once. The configuration will depend on your settings and json for Grafana.
Setting up Prometheus
Go back to your Prometheus server and edit the prometheus.yml file.
sudonano/etc/prometheus/prometheus.yml
Enter the following parameters, the prometheus.yml file should look like this:
Now is the time to go to the browser. Navigate to http://your_grafana_ip:3000 and you should see the Grafana home page. To log in your initial username is admin and your password is admin.
The system immediately asks us to come up with a new password.
After changing the password, click "Configuration" and then "Data Sources".
Now click on Add data source and select the Prometheus data source.
Now enter the IP address with port 9090. If you have decided to run Prometheus and Grafana on the same server, type http://localhost:9090 If you have separated Grafana and Prometheus into two servers, then enter the IP address of Prometheus.
Save the settings.
Now you need to download the json files of the dashboard. To do this, you need to know the ID of the json file or download it from someone or create it yoursel. You can find json here.
Now click on Dashboard and then on Manage.
Now click on Import and then on Upload JSON file.
Upload the JSON file you downloaded earlier, then select the Prometheus data source you just configured and click the +Import button.