Aura Network Node Monitoring & Alerts

Staking4All
4 min readAug 29, 2022

--

Creating a quick guide showing how simple it is to setup monitoring for your Aura node.

I personally prefer zabbix as it comes out of the box with many things to monitor, things you don’t even think about.

So to get the right we need to do the following

  • Install zabbix server to monitor all your nodes
  • Install zabbix agent on your node
  • Then build some graphs and monitor

Step 1 — Install Zabbix server

Install your Zabbix server as listed below. Can also find instructions on Zabbix download site.

— Install Zabbix repository — 
wget https://repo.zabbix.com/zabbix/5.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_5.4-1+ubuntu20.04_all.deb
sudo dpkg -i zabbix-release_5.4–1+ubuntu20.04_all.deb
sudo apt update — Install Zabbix server, frontend, agent —
sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent — intsall mysql server —
---https://www.digitalocean.com/community/tutorials/how-to-install-mysql-on-ubuntu-20-04
sudo apt-get install mysql-server
sudo mysql_secure_installation — Create initial database —
sudo mysql -uroot -p
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> create user zabbix@localhost identified by ‘p@ssword’;
mysql> grant all privileges on zabbix.* to zabbix@localhost;
mysql> quit;— On Zabbix server host import initial schema and data —
zcat /usr/share/doc/zabbix-sql-scripts/mysql/create.sql.gz | mysql -uzabbix -p zabbix— Configure the database for Zabbix server —
sudo nano /etc/zabbix/zabbix_server.conf— Start Zabbix server and agent processes —
sudo systemctl restart zabbix-server zabbix-agent apache2
sudo systemctl enable zabbix-server zabbix-agent apache2

If all of the above is done successfully you can now login to Zabbix web console. Username will be the default, which is admin, with password being zabbix

http://yourserverip/zabbix

Inside the zabbix admin console you configure the server you want to monitor

You can add templates. These templates determine what to monitor, the one is a standard template that monitors over 40 metrics out the box. The other is a custom template made to read the blockchain node log files.

In my own Aura template I added an example where i scrape the log files for info on the blocks that would increment. As long as we can see blocks incrementing on our node will be in sync.

Step 2 — Install Zabbix Agent

You can now install the agent on your Aura node and collect info. You will send the info to your main monitor install did in Step 1

— install agent —
sudo apt install zabbix-agent
sudo nano /etc/zabbix/zabbix_agentd.conf

Below is the config file for the zabbix agent that will be opened

You need to change the parameters as shown below

Server=YOUR_SERVER_MONITORING_IP
ServerActive=YOUR_SERVER_MONITORING_IP
Hostname= HOSTNAME_OF_SERVER_WITH_AGENT

You can then stop and start the agent and check the logs of the agent

— start agent —
sudo service zabbix-agent status
sudo service zabbix-agent stop
sudo service zabbix-agent start— check agent logs —
tail -50 /var/log/zabbix-agent/zabbix_agentd.log

The above will allow you to gather a whole bunch of metrics according to the templates you assigned. Some standard ones from Zabbix, some of your own.

Step 3 — Build some graphs

Now you ready to build your own dashboard with graphs in the dashboard section

Step 3 — Build some alerts

Then within the Media types in administration you have a host of monitoring alert options you can use. Or how you would like to be notified.

I have set it to trigger a sms to me every 5 minutes until I attend to the problem as an example.

Done

We are now done and have created a dashboard making use of out of the box metrics, plus some additional custom metrics specific to the node. But most importantly added some alerts

--

--