Skip to content

Check a list of URLs and send email about it.

Notifications You must be signed in to change notification settings

rhizome/urlchecker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 

Repository files navigation

README

urlcheck.rb - Check a list of URLs and send email about it.

How do I get set up?

  • Ruby 1.9+
  • Requires the Curb gem
  • Copy urlcheck.yml-sample to urlcheck.yml with your own values
  • URL list is a YAML array with the url and the response code you expect.

All of the possible options are listed in urlcheck.yml-sample:

settings:
  status_file: urlcheck.status  # use full path
  user_agent: 'https://www.github.com/rhizome'
  mail_from: "CHANGE_ME"
  mail_to: "CHANGE_ME"
  smtp_server: smtp.example.invalid
  domain: example.invalid
  markers: false
  debug: false
urls:
  - url: "http://www.yahoo.com"
    code: 301
  - url: "https://www.yahoo.com"
    code: 200
  - [...]

Cron job

$ crontab -e 

# */5 * * * * /path/to/urlcheck.rb 

Options

By default, no email is sent when checks are successful.

Usage: urlcheck.rb [options]

    -c, --config_file FILE           Path to YAML config file
    -m, --markers                    Send an email every hour even if successful 
    -s, --status                     Outputs OK or FAIL, does not send mail
    -d, --debug                      Always send mail

    -h, --help                       Show this message

Contribution guidelines

Pull requests always welcome.

Who do I talk to?

About

Check a list of URLs and send email about it.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages