Axelar & Netdata

Orangeclub
4 min readJan 16, 2022

1. Registering and configuring your personal account

Hello! I want to show you how to use the site https://www.netdata.cloud, it will help you create a system of informing you about server problems. In my case, I will set up sending notifications using the bot in telegram. So, go to the site and create an account.

First of all, let’s install it on the server and will claim data. You’ll see your own command here in your dashboard. So copy & paste it in your terminal.

Push “enter” and “yes” every time you are asked to do so during the installation process. If you see this after installation — you are good! Now you should see your node info in netdata’s dashboard:

2. Set up a telegram bot

Open in telegram: @BotFather and create a new bot and name it as you wish, after that you will choose username, but there must be the word “bot”at the end. For example, I create “axelar123bot” for me. You will get an API key that looks like: AAAA:BBBBBBBBBBBBBBBBBBB

  • Create group chat and invite your bot you just created and another one: @myidbot. My group: https://t.me/axelartest You can see alarms there.
  • Write /getgroupid@myidbot and you will get ID of your new created group.
  • Replace “AAAA:BBBBBBBBBBBBBBBBBBB” and “-XXXXXX” with you bot’s API key and groupid, which you received earlier and send test message to group via the bot using a bash command :
curl -X POST "https://api.telegram.org/botAAAA:BBBBBBBBBBBBBBBBBBB/sendMessage" -d "chat_id=-XXXXXX&text=my sample text"

If you did everything correctly, you will see the text in your chat:

3. Server setting

  • Run /etc/netdata/edit-config health_alarm_notify.conf
  • Find TELEGRAM_BOT_TOKEN=”” and put there your API key. (remember? it’s like “AAAA:BBBBBBBBBBBBBBBBBBB”)
  • Find DEFAULT_RECIPIENT_TELEGRAM=”” and paste there your group id “-XXXXXX”
  • Save changes & Restart netdata: systemctl restart netdata
  • Let’s test it! /usr/libexec/netdata/plugins.d/alarm-notify.sh test

After that you’ll receive messages to your chat with bot:

Now I will set low system settings to check if the bot is working correctly.

cd /etc/netdata
./edit-config health.d/ram.conf

Take a look here:

I’ll put $WARNING range from 1 to 5 % usage and $CRITICAL from 5 to 10, % usage, like this:

Also I’ll correct CPU alarms:

./edit-config health.d/cpu.conf

I’ll put $WARNING range from 1 to 3 and $CRITICAL from 3 to 10

And finally I’ll correct disk parameters:

./edit-config health.d/disks.conf

I put $WARNING from 1 to 5 and CRITICAL from 5 to 15

Save changes and restart netdata!

systemctl restart netdata

After few seconds you will receive information about critical RAM & CPU usage:

Now I will return these parameters to normal values. However, you can set any parameters that you consider worthy of your attention.

You can configure alerts to match your requests by further reading the netdata documentation:

- https://learn.netdata.cloud/docs/agent/health/quickstart
- https://learn.netdata.cloud/docs/agent/health/reference
- https://learn.netdata.cloud/docs/agent/health
- https://learn.netdata.cloud/docs/agent/daemon/config#health-section-options
- https://github.com/netdata/netdata/blob/master/docs/guides/monitor/dimension-templates.md

Sincerely, yours OranG3cluB

— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —

Special for Axelar.

Website: https://axelar.network/

Twitter: https://twitter.com/axelarcore

Github: https://github.com/axelarnetwork

Discord: https://discord.com/invite/aRZ3Ra6f7D

Forum: https://community.axelar.network/

Telegram: https://t.me/axelarcommunity

Youtube: https://www.youtube.com/channel/UCf8GFg58fdp1iZwLAOV1Tgg

--

--