Project

watch_list

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
watch_list is a tool to manage Uptime Robot. It defines Uptime Robot monitors using Ruby DSL, and updates monitors according to DSL.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 3.0.0

Runtime

 Project Readme

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.

Gem Version Build Status

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

export WATCH_LIST_API_KEY=u956-afus321g565fghr519

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
        --encrypt
        --decrypt
        --no-color
        --debug
    -h, --help

Robotfile example

monitor "http monitor" do
  target "http://example.com"
  interval 5
  paused false
  alert_contact :email, "alice@example.com"
  type :http
end

monitor "keyword monitor" do
  target "http://example.com"
  interval 5
  paused false
  alert_contact :email, "alice@example.com"

  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, "alice@example.com"
  type :ping
end

monitor "port monitor" do
  target "example.com"
  interval 5
  paused false
  alert_contact :email, "alice@example.com"

  type :port do
    subtype :http
    port 80
  end
end

alert_contact do
  type :email
  value "alice@example.com"
end

Encryption

git config watch-list.pass "**secret password**"
git config watch-list.salt "nU0+G1icf70="
# openssl rand -base64 8

watch_list --encrypt "secret value"
monitor "http monitor" do
  target "http://example.com"
  interval 5
  paused false
  alert_contact :email, "alice@example.com"

  type :http do
    httpusername "username"
    httppassword secure: "yI8mtdeyGrc16+wH9taw9g=="
  end
end

Similar tools