SmartNodeMonitorBot

View this thread on: d.buzz | hive.blog | peakd.com | ecency.com
·@dustinface·
0.000 HBD
SmartNodeMonitorBot
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. 
<center>![smartnode1.jpg](https://steemitimages.com/DQmQx9fU9EW899vuRyGVAw9bv5ffQ6YUUK7c6Vsnjdf6yYy/smartnode1.jpg)</center>
# 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.png](https://steemitimages.com/DQmPSuGkhPcNd6HonZo3iBjqrvLhgttNrWT4Ghbaffwz6bC/Bildschirmfoto%202018-02-12%20um%2021.34.17.png)|![telegram_add](https://steemitimages.com/DQma7fMnMFGATy4yv4AjfVohnR1upG5kd1sBSwXeBpmFPCJ/Bildschirmfoto%202018-02-12%20um%2021.44.13.png)
------------ | -------------
### 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.png](https://steemitimages.com/DQmRTxz6GTu3SQm5PLpxdcQZj2TaUapbiqgbAQcdmeY67DJ/Bildschirmfoto%202018-02-12%20um%2021.34.50.png)|![Bildschirmfoto 2018-02-12 um 21.44.45.png](https://steemitimages.com/DQmeGsa3VGNHd7cX9JeBUsFmnPWU6PyEQXGdn56WgckSSs6/Bildschirmfoto%202018-02-12%20um%2021.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.png](https://steemitimages.com/DQmWAc1ungFmF8f3sPd4RGGWNF8Lwofwdd3nvB8QSJNmVWg/Bildschirmfoto%202018-02-12%20um%2021.36.38.png)|![Bildschirmfoto 2018-02-12 um 21.45.54.png](https://steemitimages.com/DQmSYyiMrH4PebjgYBuWy61mQxF8YnmteBVnLpdUYZoPoN2/Bildschirmfoto%202018-02-12%20um%2021.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: 
Telegram | Discord | Description
------------ | ------------- | ------------- 
**/state 1/0** | **state 1/0** |  To enable/disable node state change notifications 
**/reward 1/0** | **reward 1/0** |  To enable/disable payout notifications 
**/timeout 1/0** | **timeout 1/0** |  To enable/disable timeout notifications 
**/network 1/0** | **network 1/0** |  To enable/disable network update notifications 

Below you see how to enable/disable network notifications.
![Bildschirmfoto 2018-02-13 um 08.56.18.png](https://steemitimages.com/DQmWyMpBjLr1X1oUMa5Hq6tk9NwqvfEg1ViRYJGPSUWC6Se/Bildschirmfoto%202018-02-13%20um%2008.56.18.png)|![Bildschirmfoto 2018-02-12 um 21.46.16.png](https://steemitimages.com/DQmXJVasS9tcT5ujWryCjmpBs4xw5mQdS1RCmJGhJdvq9dT/Bildschirmfoto%202018-02-12%20um%2021.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.png](https://steemitimages.com/DQmR8F5Hamp4crbGdrwUKsuSCjYH4dDG5phamxM9umFwf7F/Bildschirmfoto%202018-02-13%20um%2009.12.34.png)|![Bildschirmfoto 2018-02-13 um 09.12.55.png](https://steemitimages.com/DQmYVCNDXt3gTU3HKsJLkXvENNm3K3DJSXidwrJb3E8ZHb2/Bildschirmfoto%202018-02-13%20um%2009.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.png](https://steemitimages.com/DQmQE33L2AR5bxNueoQ9vdqirpeVByshpsGVf9MbPRHJzoq/Bildschirmfoto%202018-02-13%20um%2009.13.40.png)|![Bildschirmfoto 2018-02-13 um 08.39.15.png](https://steemitimages.com/DQmat6M6r37KC3B659JoUkD7ovfQGX5g7VtSCBgRRT3mnUW/Bildschirmfoto%202018-02-13%20um%2008.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.png](https://steemitimages.com/DQmSYAMZUNdNAfHaVAg2qHJMhjNbAbaEfrj4AvpZJNy84np/Bildschirmfoto%202018-02-13%20um%2008.48.46.png)|![Bildschirmfoto 2018-02-13 um 08.49.22 Kopie.png](https://steemitimages.com/DQmcP6eMV1mJ9iT3QBXKsQRkCdxKApH1bwn2ayvjSBezb8J/Bildschirmfoto%202018-02-13%20um%2008.49.22%20Kopie.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.png](https://steemitimages.com/DQmYePAiymgYBJZEqJhFTA3kUYUe2K6gMSLg1oR98UrDMjk/Bildschirmfoto%202018-02-13%20um%2009.12.42.png)|![Bildschirmfoto 2018-02-13 um 09.13.01.png](https://steemitimages.com/DQmYQzWzGGBkAEwByCrCgbycMARmwtnFGNZVxxRgePtHR1z/Bildschirmfoto%202018-02-13%20um%2009.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.png](https://steemitimages.com/DQmQUjA1skwXZcrFdyEqtDAmew3rpyw7e4xnJypqXRRcH6T/Bildschirmfoto%202018-02-12%20um%2021.36.17.png)|![Bildschirmfoto 2018-02-12 um 21.45.34.png](https://steemitimages.com/DQmSMfztjyRP496goYpzqzZmSz6HWjQwuzWgpXKytAssxXD/Bildschirmfoto%202018-02-12%20um%2021.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.png](https://steemitimages.com/DQmWEs8rX7VKKLBNZSK7TjLArMTMpzZgkFcTJy27Py9mBfe/Bildschirmfoto%202018-02-12%20um%2021.36.24.png)|![Bildschirmfoto 2018-02-12 um 21.45.42.png](https://steemitimages.com/DQmVp2ZetrLGVPcwQ57aNfp9uez4dE1zvYivhZ9Ukkz2p8M/Bildschirmfoto%202018-02-12%20um%2021.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.png](https://steemitimages.com/DQmTeNKx7H119aPFQzezGyjFR4swQtbbJF8uQUixQsNTbna/Bildschirmfoto%202018-02-13%20um%2000.15.32.png)|![Bildschirmfoto 2018-02-13 um 00.23.14.png](https://steemitimages.com/DQmfZ8pBRpJuP5wkyeV9Q4HhgTW34dBnA52QxnSmLkDcbC9/Bildschirmfoto%202018-02-13%20um%2000.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.png](https://steemitimages.com/DQmQ8rYemRTkR2eFZ3rh6tEjrCFCqdd5baYTHwucLfct69P/Bildschirmfoto%202018-02-12%20um%2021.18.09.png)|![Bildschirmfoto 2018-02-13 um 00.27.20.png](https://steemitimages.com/DQmNPkR9jXdmUecy96K6j1XvmX8bVxHfBLJzuhoVbn8KdYD/Bildschirmfoto%202018-02-13%20um%2000.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.png](https://steemitimages.com/DQmXJbLSynfaY5tGuNu9pBRtunckha6TLAT9PBXXw47PLon/Bildschirmfoto%202018-02-12%20um%2021.36.10.png)|![Bildschirmfoto 2018-02-12 um 21.45.00.png](https://steemitimages.com/DQmctXN1JtUWqgACKuP1r2bcuqf6VUaze7j33BHchxVZzWf/Bildschirmfoto%202018-02-12%20um%2021.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.png](https://steemitimages.com/DQmUkp9Y3pBSsFaaoKqGyJH2Ssq3nmc9tY4SWoT9h7SKo1V/Bildschirmfoto%202018-02-13%20um%2009.47.03.png)|![Bildschirmfoto 2018-02-12 um 21.49.12.png](https://steemitimages.com/DQmQVnmkPh5q8Ptr31qyNYxQEAdLJgwZ1KvTkTeUSdbfU46/Bildschirmfoto%202018-02-12%20um%2021.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.png](https://steemitimages.com/DQmbKzHSPVNd8Pm8MEA6ELmvN3PAeECVta42ZKKoYAyFmBh/Bildschirmfoto%202018-02-12%20um%2022.11.24.png)| ![Bildschirmfoto 2018-02-12 um 22.12.48.png](https://steemitimages.com/DQmaLpDKe8RurYPcmRUXGA91NJZsHFXnk37NkDKmpVjBjhB/Bildschirmfoto%202018-02-12%20um%2022.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
👍 , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,