Skip to content

Python utility to ping hosts and send e-mail if status is changed

License

Notifications You must be signed in to change notification settings

dantro86/ping-to-mail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ping-to-mail

Python utility to continuously pinging hosts and send e-mail if a host status is changed.

Programm takes ip list from ip_list file. The availability is being verified for each element in this list. If host is down a message will be sent to configurable e-mail address. If host was down and is available now an another message will be sent. Both text messages are configurable.

Usage: sudo python pingtomail.py

-s SLEEP, --sleep SLEEP sleep time for ping running in sec. Default - 15
-c CONFIG, --config CONFIG path to configuration file. Default - config.ini

Sudo is required due pyping requirements.

For working this application Google API is required. See Turn on the Gmail API section https://developers.google.com/gmail/api/quickstart/python Save your client_secret.json file and cofigure CLIENT_SECRET_FILE and APPLICATION_NAME values according your settings in config.ini file.

About

Python utility to ping hosts and send e-mail if status is changed

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages