Skip to content

💓 a simple heartbeat script that checks to see if a server is online every five minutes. if it's not, it sends a text message using the twilio-sms api.

License

Notifications You must be signed in to change notification settings

joshterrill/heartbeat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

heartbeat

a simple heartbeat script that checks to see if a server is online every five minutes. if it's not, it sends a text message using the twilio-sms api or an email using mailutils.

If you want to use the twilio-sms api:

git clone https://github.com/joshuaterrill/heartbeat.git
cd heartbeat/text
chmod 775 twilio-sms.sh
chmod 775 heartbeat
#optionally, you can run 'screen' and run the script in another terminal tab
./heartbeat -s <server> -r <rate> -t <recipient>

If you want to use mailutils

sudo apt-get install mailutils
git clone https://github.com/joshuaterrill/heartbeat.git
cd heartbeat/email
chmod 775 heartbeat
#optionally, you can run 'screen' and run the script in another terminal tab
./heartbeat -s <server> -r <rate> -t <recipient>

if a server is behind a firewall and cannot be pinged, you may install hping3

sudo apt-get install hping3

and replace the ping with

if hping3 -S  $SERVER -p 8011 -c 1 > /dev/null;

references

twilio-sms documentation mailutils documentation

About

💓 a simple heartbeat script that checks to see if a server is online every five minutes. if it's not, it sends a text message using the twilio-sms api.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages