5. Node Monitoring
Installation of Node Monitoring
In this chapter, we will walk you through the setup of local monitoring for your collator node.
Installation
Make sure you download the latest releases. Please check Prometheus, Process exporter, and Grafana download pages. We will continue to update this guide but recommend that you verify that you are installing the latest versions.
There are 7 steps to install these packages:
- Download
- Extract
- Move the files to
/usr/lib/bin
- Create dedicated users
- Create directories
- Change the ownership of those directories
- Cleanup
Prometheus
#download files
wget https://github.com/prometheus/prometheus/releases/download/v2.33.4/prometheus-2.33.4.linux-amd64.tar.gz
#extract
tar xvf prometheus-*.tar.gz
#move the files to /usr/lib/bin
sudo cp ./prometheus-2.33.4.linux-amd64/prometheus /usr/local/bin/
sudo cp ./prometheus-2.33.4.linux-amd64/promtool /usr/local/bin/
sudo cp -r ./prometheus-2.33.4.linux-amd64/consoles /etc/prometheus
sudo cp -r ./prometheus-2.33.4.linux-amd64/console_libraries /etc/prometheus
#create dedicated users
sudo useradd --no-create-home --shell /usr/sbin/nologin prometheus
#create directories
sudo mkdir /var/lib/prometheus
#change the ownership
sudo chown prometheus:prometheus /etc/prometheus/ -R
sudo chown prometheus:prometheus /var/lib/prometheus/ -R
sudo chown prometheus:prometheus /usr/local/bin/prometheus
sudo chown prometheus:prometheus /usr/local/bin/promtool
#cleanup
rm -rf ./prometheus*
Node Exporter
#download files
wget https://github.com/prometheus/node_exporter/releases/download/v1.3.1/node_exporter-1.3.1.linux-amd64.tar.gz
#extract
tar xvf node_exporter-*.tar.gz
#move the files to /usr/lib/bin
sudo cp ./node_exporter-1.3.1.linux-amd64/node_exporter /usr/local/bin/
#create dedicated users
sudo useradd --no-create-home --shell /usr/sbin/nologin node_exporter
#change the ownership
sudo chown node_exporter:node_exporter /usr/local/bin/node_exporter
#cleanup
rm -rf ./node_exporter*