Skip to content

This Repository will Monitor a smartnode and is designed to run from your MAC if you have MULTIPLE smartnodes

Notifications You must be signed in to change notification settings

controllinghand/smartnode-monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

smartnode-monitor

Bash Monitor for smartnode on Ubuntu 16.04 LTS x64 agent

Bash Monitor for MAC OS 10.13.2 server

ATTENTION: This installer is only suitable for a dedicated vps for the agent and MAC OS for the server.

This Repository will Monitor a smartnode and is designed to run from your MAC if you have MULTIPLE smartnodes

You must run this script as root on your VPS even if you installed smartcashd as another user like smartadmin

You will run this script as your normal Mac user from a terminal to view all of your smartnodes

First Step

This shell script accomplishes the following on your VPS (Installs SmartNode Monitor Agent)

Please install this on all of your SmartNode VPS

  1. Creates a snmon directory in the root home directory ~/snmon
  2. Creates a snmon directory in the smartadmin home directory so that ssh can grab data
  3. Installs the snmonagent.sh in the ~/snmon directory for the root user
  4. Creates a crontab job that runs every 30 mins snmonagent.sh
  5. snmonagent.sh collects the following information in this order
  • date script collected data
  • hostname
  • the user that is running smartcashd process
  • checks to see if the smartnode is up and running
  • check the OS the smartnode is running
  • check to see if there are any OS packages that need to be updated
  • check the protocol version of smartcashd currently running
  • check % of disk space used
  • checks to see if the firewall is active
  • checks to see that port 22 ssh is limit
  • checks to see that port 9678 for smartnode is allow
  • checks to see if all the recommended cronjob are installed
  1. All of this data is stored in the smartadmin home directory in a file /home/smartadmin/snmon/snmon.dat

Second Step

This shell script also accomplishes the following on your Mac OS (Installs SmartNode Monitor Server)

  1. To avoid having to enter in the ssh password evertime please do a ssh-add before running the script
  2. Creates a snmon directory in the Mac user home dir ~/snmon
  3. Installs a snmon.sh script in the ~/snmon directory for the Mac user
  4. Creates a iplist of all your SmartNodes (You will have to input manually)
  5. When you run snmon.sh it collects all of the snmon.dat files from each SmartNode and reports on status
  6. There are three status [OK] [Warning] [Failed]

Login to your vps as smartadmin and su - (switch to the root user to install):

wget -N https://rawgit.com/controllinghand/smartnode-securenode/master/installsnma.sh
bash ./installsnma.sh

Login to your Mac and bring up a terminal:

curl -O https://raw.githubusercontent.com/controllinghand/smartnode-monitor/master/installsnm.sh
bash ./installsnm.sh

Donation to my Smartcash please: SebFkuHrqDnj3obXvMtfxtQKRgFeVpXF5x

About

This Repository will Monitor a smartnode and is designed to run from your MAC if you have MULTIPLE smartnodes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages