Watch Dog watchdog.wb8odf (wb8odf@yahoo.com)
------------------------------------------------------------------------

SUMMARY

This program will monitor your IRLP or EchoIRLP Linux Box and email you changes.
Any information you can get from a command line can be added to this program.



Written: 02/16/2015
By: Dave Parks (WB8ODF)

Last Updated: 03/17/2015
By: Dave Parks (WB8ODF)



NOTICE: NO WARRANTY IS EXPRESSED AS TO THE SUITABILITY OR STABILITY OF THIS PROGRAM
AND YOUR LINUX OS. IT MAY BREAK YOUR NODE. I AM AVAILABLE FOR SUPPORT AT THE E-MAIL
ADDRESS OR NODE NUMBERS LISTED AT THE TOP OF THIS PAGE. THE INSTALL OF THIS PROGRAM
ASSUMES YOU KNOW ENOUGH ABOUT LINUX TO MOVE ABOUT, EDIT FILES AND JUST A LITTLE OF THE
CUSTOM_DECODE FILE. IF THIS IS YOUR FIRST INSTALL (NOT AN UPDATE) YOU WILL NEED TO HAVE
ACCESS TO THE ROOT ACCOUNT TO EDIT THE /ETC/SUDOERS & $CUSTOM/rc.irlp FILES EXPLAINED AT
THE BOTTOM OF THE README FILE AND NOTED IN THIS FILE. -- HOPE YOU LIKE IT!!!


FILENAME DESCRIPTTION
---------- -------------------------------------------------------
README..........................................- The file you are reading
watchdog.wb8odf..............................- The main script
watchdogsbones................................- Watch Dogs Environment file
message............................................- The email templete
uninstall.............................................- Uninstall this program and clean up
install................................................- Installs the files to the correct directories
........................................................- and sets ownerships & permissions.
unkey-if-no-net-activity.wb8odf........- This script allows me to look at any incoming
........................................................- IP packets to let a number of WB8ODF scripts
........................................................- know if they need to unkey due to NO IP traffic
........................................................- or stay keyed because there is incomming audio.
.........................................................- There are two versions of this file, if you
........................................................- are running Debian, make sure you have that
........................................................- version. In this install it will ask you if
........................................................- your OS is Debian, if you answer "Y" or "y"
........................................................- the install file will install the correct one.



Credits: - Reed AD7ZW for giving me the idea to create this program.

- Bill N2WNS for doing ALL the BETA testing, working with me for a number of
- hours debuging the install, configuration and running of the scripts.



ABOUT WATCHDOG:

Reed AD7ZW posted a thred in the IRLP Yahoo Group asking if there was anyone who could
make a script he found work to show if someone was connected to his node, he also wanted
to grab some more information from his node and receive it via email.

This gave me the idea to write a MONITORING PROGRAM that I hope will help everyone to
retrieve as much information from their nodes via sSMTP or SENDMAIL email clients.

The program monitors two types of information, the IRLP EchoIRLP information and the
Linux Box's System information. I will list some of the information available from
this program starting with version 1.0.

IRLP & EchoIRLP:
1). Is your node enabled / disabled?

2). If enabled is it active or is the link clear?

3). If you are active are you connected to anyone?

4). If active and connected, who are you connected to?


Linux System:
1). Your systems up time which includes how long your
node has been up and running, Who is currently
logged into your system (short version) and your
current load average for the last 1, 5 and 15 minutes.

2). Who is logged into your system (long version) which
includes their IP addresses.

3). All processes currently running on your Linux Box.

4). Your total Disk Usage.

5). A PING TEST that will allow you to monitor not only
your IP Network but others. This will help you keep
an eye on such things as Is my network SLOW and
is one of my other nodes network SLOW or even DOWN!
This TEST will become more proactive in reading exactly
what the trouble might be in later versions.

These are just a few things that can be monitored in version 1.0 and I will keep adding
NEW items as the version number climbs. This program is able to email any information
you could get manually by being logged in typing it in on the command line.

If you have a question, suggestion or would like to add to the WISH LIST, please feel free
to email me at the address listed at the top of this page.






GETTING THE PROGRAM: - wget http://wb8odf.com/scripts/watchdog.wb8odf.tgz


INSTALLING (don't forget to become user repeater: su - repeater)


1. Make sure the tar file is in your /home/irlp directory:

2. Extract the the contents of watchdog.wb8odf.tgz:

tar -zxvf watchdog.wb8odf.tgz

3. Change to the watchdog directory:

cd watchdog.wb8odf

4. Read the README file (it's the same as this file)

less ./README or more ./README

5. Execute the install script:

./install

6. Edit the watchdogsbones file it is the programs environment file. (This is were you set everything up)

Use your favorite editor (ex: pico ./watchdogsbones -or- nano ./watchdogsbones)

7. Add this to your $CUSTOM/custom_decode file

if [ "$1" = "XXX" ] ; then "$CUSTOM"/watchdog.wb8odf 000 ; exit 1 ; fi
if [ "$1" = "XXX" ] ; then "$CUSTOM"/watchdog.wb8odf 111 ; exit 1 ; fi

(where XXX is the DTMF tone numbers you have picked)
(The 000 turns watchdog OFF and 111 turns watchdog ON)

----------------------------------------------------

NOTES: IF YOU DO NOT LIKE THIS PACKAGE :(

You can remove it like this:

./uninstall

Scripting ideas: wb8odf@yahoo.com

---------------------------------------------------------------------

PS: My node is 8139 and you can also reach me at wb8odf@yahoo.com
ALWAYS happy to help out and support not only my scripts but others.

I am also more than happy to custom write scripts & make audio files.

©2015 WB8ODF.COM