SmartNodeMonitorBot

in #smartcash7 years ago (edited)

As result of my approved proposal

https://vote.smartcash.cc/Proposal/Details/SmartNode-Monitor-Telegram-Discord

i developed two bots to give SmartNode owners an easy way to monitor their SmartNodes (one for telegram and one for discord). This article will give you an insight to the features and the usage of the bots.

smartnode1.jpg

Features

The most important feature of the bots, at least in my opinion, is Timeout Notifications. If they are enabled you will receive a notification from the bot if one of your nodes could not be discovered from the node network longer than 30 minutes. This means in the most cases something is wrong with your node. If this happens you will have 30 minutes to solve the issue before your node gets kicked out to the end the payout queue. Save your rewards!

  • Check the current number of created/enabled nodes in the network
  • Add/edit/remove your nodes in a private chat with the bot.
  • Display a detailed summary of all your added nodes. Metrics include:
    • Status
    • Public address
    • Uptime
    • Last seen
    • Last payout block and time
    • Protocol
    • Rank
  • Check the current balance of your nodes
  • Enable/disable several notifications in a private chat with the bot:
    • Reward notifications – Receive a notification when one of your nodes receives a reward.
    • Status notifications – Receive a notification if one of your nodes changes its status.
      Why this is important - If your bot’s status is anything but Enabled, you will lose your payout positioning until you manually check and resolve the issue. Enabling notifications removes the need to constantly check each node’s status manually and allows you to address the issue in a quick and timely manner.
    • Network notifications – You will receive a notification each time a new node joins/leaves the SmartNode network.
    • Timeout notifications – You will receive a notification when the lastSeen timestamp of your node is greater then 30 minutes.

QuickStart

To access the telegram bot you just need to PM: https://t.me/SmartNodeMonitorBot

The discord bot is available on the SmartCash discord server: https://discord.gg/8zTBZ73 just PM @SmartNodeMonitor#5083 there.

The left aligned screens in the guide will show you the usage in telegram, the right aligned are for discord.

1. Add your nodes

At first you need to add your nodes by their IP-Adresses. The command to add nodes is /add in telegram or add for discord.

Add a single node

If you want to add just one node you need to call the add command with 1 parameter: ip;name where ip is the IP-Address of the node to add and name the name you want to give it. I would recommend to use the same as you used in your desktop wallet as alias.

The full command - /add ip;name for telegram, add ip;name for discord. Here is an example:

Bildschirmfoto 2018-02-12 um 21.34.17.pngtelegram_add

Add multiple nodes

If you plan to add multiple nodes you can just line them up in one command line by adding multiple parameters of the form ip;name.
The command to add two more nodes would be: /add ip1;name1 ip2;name2 in telegram or add ip1;name1 ip2;name2 for discord.

Bildschirmfoto 2018-02-12 um 21.34.50.pngBildschirmfoto 2018-02-12 um 21.44.45.png

2. Setup your desired notifications

Once you added your nodes you can check your notification states with the /me command in telegram or me for discord.

Bildschirmfoto 2018-02-12 um 21.36.38.pngBildschirmfoto 2018-02-12 um 21.45.54.png

The example above shows the default state. If you want to change any of the notification states you can use the following commands:

TelegramDiscordDescription
/state 1/0state 1/0To enable/disable node state change notifications
/reward 1/0reward 1/0To enable/disable payout notifications
/timeout 1/0timeout 1/0To enable/disable timeout notifications
/network 1/0network 1/0To enable/disable network update notifications

Below you see how to enable/disable network notifications.

Bildschirmfoto 2018-02-13 um 08.56.18.pngBildschirmfoto 2018-02-12 um 21.46.16.png

Notification examples

Status
If the status of one of your nodes changes you will receive a notification like in the example below. This includes all state changes.

Bildschirmfoto 2018-02-13 um 09.12.34.pngBildschirmfoto 2018-02-13 um 09.12.55.png

Reward
If one of your nodes receives a payout you will receive a notification like in the example below.

Warning: At the time of writing the nodelist in the smartcashd has an known issue that not all paid blocks are assigned to to node which got paid. As result you may miss some payout notifications at the moment. This should become more accurate with the next SmartCash wallet update.

Bildschirmfoto 2018-02-13 um 09.13.40.pngBildschirmfoto 2018-02-13 um 08.39.15.png

Timeout
Like you see in the example below you receive a notification once your node was not seen for 30 minutes and also if it has recovered.

Bildschirmfoto 2018-02-13 um 08.48.46.pngBildschirmfoto 2018-02-13 um 08.49.22 Kopie.png

Network
Network notifications means you will receive a notification if a node joined/left the SmartNode network.

Bildschirmfoto 2018-02-13 um 09.12.42.pngBildschirmfoto 2018-02-13 um 09.13.01.png

3. Enjoy it!

As soon as you added your nodes and set your desired notification states you are ready to go. From now on you can simply wait for any notifications or check the stats of your nodes with the following commands:

Detail view

To print a list with all available metrics of your node you can use the /detail command for telegram or just detail for discord.

Bildschirmfoto 2018-02-12 um 21.36.17.pngBildschirmfoto 2018-02-12 um 21.45.34.png

Summary

To print a shortened list of your nodes states, lastpaids and lastseens attributes you can use the /nodes command for telegram or just node for discord.

Bildschirmfoto 2018-02-12 um 21.36.24.pngBildschirmfoto 2018-02-12 um 21.45.42.png

Balances

The /balance command in telegram or balance for discord allows you to checkup the balances of all your nodes addresses. This relies on the official SmartCash explorers.

Bildschirmfoto 2018-02-13 um 00.15.32.pngBildschirmfoto 2018-02-13 um 00.23.14.png

Additional commands

Get the current count of created/enabled nodes in the network with /info in telegram or info for discord.

Bildschirmfoto 2018-02-12 um 21.18.09.pngBildschirmfoto 2018-02-13 um 00.27.20.png

Change the name of one of your nodes with /update ip;name in telegram or update ip;name for discord. Where ip is the IP-Address of the node you want to give a new name and name the new name.

Bildschirmfoto 2018-02-12 um 21.36.10.pngBildschirmfoto 2018-02-12 um 21.45.00.png

To update the names of multiple nodes use the same process like to adding multiple nodes. /update ip1;name1 ip2;name2 ip3;name3 in telegram or update ip1;name1 ip2;name2 ip3;name3 for discord.

If you got rid of one of your nodes, hell...why you would do this, you can remove it with /remove ip in telegram or remove ip for discord. Where ip is the IP-Address of the node you want to remove.

Bildschirmfoto 2018-02-13 um 09.47.03.pngBildschirmfoto 2018-02-12 um 21.49.12.png

If you got rid of multpile nodes remove them with /remove ip0 ip1 ... ipN in telegram or remove ip0 ip1 ... ipN for discord. Where ip0 - ipN are the IP-Address of the nodes you want to remove.

And finally to remove all your nodes just use /remove all in telegram or remove all for discord.

To just print all available commands send /help in telegram or help for discord.

Bildschirmfoto 2018-02-12 um 22.11.24.pngBildschirmfoto 2018-02-12 um 22.12.48.png

Have fun!

If you have any problems or questions feel free to contact me in the SmartCash Discord @dustinface#6318

The source code of the bots is hosted on GitHub https://github.com/xdustinface/SmartNodeMonitorBot

Sort:  

Thank you for posting and joining Steemit.......@dustinface.

Truly remarkable service......appreciate it very much.

Congratulations on your approved proposal.

Welcome to Steemit.

Cheers.

Thanks @all for the nice comments :D glad you enjoy it!

Great work my good sir!

Thank you for your contribution! This would be really helpful!

Good work!

Thanks! 😃

Σ$$$ Tipped @dustinface Σ10 SMART! Comment @smartbot help to claim. Currently the price of SmartCash in the market is $0.241 USD per SMART. Current value of the tip is $2.41 USD. To find out more about SmartCash, please visit https://smartcash.cc.

@dustinface thanks for the bot. it is a great tool. I find it very accurate. It was able to pick on a very brief disconnection my node had during a reboot that lasted less than 5 minutes. None of my other monitoring tools or sites indicated this brief disconnection.

Great! 😍

@dustinface you did a great BOT!, it makes SmartNodes owners happier!! Cheers

@dustinface Great job! Really great idea and nice clean execution of it. Really easy to use and provides a great service. Now I don't have to keep my wallet open (and blockchain synced) or be chained to my laptop to be sure my nodes are making that money! : ) Thanks man. I'll shoot you a tip once I figure out how to load tipbot with some SMART!

Dude, Best Work what a Legend. :-)

Nice!

Could this be running on our own discord?
So am i able to just invite the Bot?

I guess you are the guy from the discord? So things are cleared now, right? :D

Congratulations @dustinface! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of upvotes

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

Upvote this notification to help all Steemit users. Learn why here!

This is really superb....thank you for everything @smartbot.

Bro this Bot is very Nice !

Can you Create a bot for Other Masternodes too ?This would be great, i have run a lot of Masternodes like Craves, Linda

You rock!

Σ$$$ Tipped @dustinface Σ10 SMART! Comment @smartbot help to claim. Currently the price of SmartCash in the market is $0.198 USD per SMART. Current value of the tip is $1.98 USD. To find out more about SmartCash, please visit https://smartcash.cc.