Skip to content

A simple Ruby script to pull a URL, search for a string, and log the result.

License

Notifications You must be signed in to change notification settings

amarciniak25/simple-site-monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

simple-site-monitor

A simple Ruby script to pull a URL, search for a string, and log the result to a CSV file.

Usage

ruby simple-site-monitor.rb --site=URL --pattern=pattern --log=log-file

Example

ruby simple-site-monitor.rb --site=https://google.com --pattern=body --log=log.csv

Scheduling

I use a cron job to run the program every five min.

Example cron Line

*/5 * * * * /usr/bin/ruby ~/simple-site-monitor/simple-site-monitor.rb --site=https://google.com --pattern=body --log=google-uptime.csv

Background

We needed a method for monitoring uptime of a mission critical app that is hosted on the internal network. Uptime monitoting services would not work because the app is only accessable from the inside.

About

A simple Ruby script to pull a URL, search for a string, and log the result.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages