watch_list
watch_list is a tool to manage Uptime Robot.
It defines Uptime Robot monitors using Ruby DSL, and updates monitors according to DSL.
Installation
Add this line to your application's Gemfile:
gem 'watch_list'
And then execute:
$ bundle
Or install it yourself as:
$ gem install watch_list
Usage
watch_list -e -o Robotfile
vi Robotfile
watch_list -a --dry-run
watch_list -a
Help
Usage: watch_list [options]
--api-key API_KEY
-a, --apply
-f, --file FILE
--dry-run
-e, --export
--split
-o, --output FILE
-s, --status
--no-color
--debug
-h, --help
Robotfile example
monitor "http monitor" do
target "http://example.com"
interval 5
paused false
alert_contact :email, "[email protected]"
type :http
end
monitor "keyword monitor" do
target "http://example.com"
interval 5
paused false
alert_contact :email, "[email protected]"
type :keyword do
keywordtype :exists
keywordvalue "Example Domain"
end
end
monitor "ping monitor" do
target "127.0.0.1"
interval 5
paused false
alert_contact :email, "[email protected]"
type :ping
end
monitor "port monitor" do
target "example.com"
interval 5
paused false
alert_contact :email, "[email protected]"
type :port do
subtype :http
port 80
end
end
alert_contact do
type :email
value "[email protected]"
end