Skip to content

jciskey/site-sonar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

site-sonar

An Automated Site-Active Checker

Every client thinks they're the center of the universe and get mad at the slightest downtime, but as developers we can't afford to sit around and click "refresh" on every site we've deployed just to make sure it's still up. site-sonar is a simple tool to allow you to automatically ping a URL and verify that it is active, so you can have peace of mind that your sites are still serving and focus on new projects.

By default, site-sonar considers any response aside from a Status Code 200 to be a failure. This is normally what is desired, but it is customizable by passing in a settings file.

Usage

Input - A list of urls to check (uses default settings)

$ python site-sonar.py http://sleeplesshacker.com http://sleeplesshacker.com/non-existent-page
Failed URLs:
http://sleeplesshacker.com/non-existent-page
$ 

Input - A YAML file specifying custom settings to be checked on each page

$ python site-sonar.py -f ../testfile.yaml
Failed URLs:
http://sleeplesshacker.com/non-existent-url

YAML file

[
 {
  url: "http://sleeplesshacker.com",
  status_code: 200
 },
 {
  url: "http://sleeplesshacker.com/non-existent-url"
 },
 {
  url: "http://sleeplesshacker.com/non-existent-url-404",
  status_code: 404
 }
]

Requirements

site-sonar is developed on Python 2.7, with the following libraries:

  • PyYAML==3.10
  • argparse==1.2.1
  • requests==1.2.3
  • wsgiref==0.1.2

If you get it to work using other combinations, feel free to let me know and I'll put up a note about it.

About

Automated Site-Active Checker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published