0.0
No commit activity in last 3 years
No release in over 3 years
A simple CLI Pingdom-like written in ruby. Check your site's HTTP status code and notify via Slack if anything went wrong.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0

Runtime

~> 0.9.0
>= 1.5.1, ~> 1.5
~> 0.19.1
 Project Readme

Ping My Site

A simple CLI Pingdom-like written in ruby. Check your site's HTTP status code and notify via Slack if anything went wrong.

How to use

Git clone

git clone https://github.com/cedricbousmanne/PingMySite.git

Install required Gem

bundle

dotenv (.env)

Copy the .env_schemafile to .envand fill it.

cp .env_schema .env

Run

bin/ping-my-site ping http://google.com --expected-status-code 200 --follow-location false

Options

  • --expected-status-code XXX : define the expected HTTP status code (default: 200)
  • --follow-location true: allow CURL to follow HTTP redirection (default: false)

Usecase

Test HTTP status

bin/ping-my-site ping http://google.com --expected-status-code 200

Test HTTP redirection

bin/ping-my-site ping http://mysite.be --expected-status-code 301 --follow-location false --expected-redirect-url http://www.mysite.be

Troubleshooting

Dotenv::Schema::ValidationError

Something is missing in your .envfile. Compare it to .env_schemaand be sure every constant is defined.

Use with crontab

          • /bin/bash -l -c 'cd /path/to/ping-my-site/ && bundle exec bin/ping-my-site ping http://www.6x7asbl.be --expected-status-code 200 --follow-location false'

Technologies

Roadmap

  • Add proxy support (host, port, username, password)
  • Add content-check support (both string and regex)
  • Add description to gemspec
  • Add GitHub URL to gemspec
  • Add LICENCE file
  • Add post_install_message to gemspec

Foot Note

Coded with ♥, Ruby and Vim. Made in Belgium.