aws_site_monitor 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/bin/{monitor → aws_site_monitor} +0 -0
- data/lib/aws/site_monitor/version.rb +1 -1
- metadata +3 -5
- data/lib/aws/site_monitor/manage.rb +0 -23
- data/lib/aws/version.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c82ef18a627acea47eba9c717821d2d521481325
|
4
|
+
data.tar.gz: 327a17f119ec3e359b190901c4633833293f634d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe1d718eb5d70e8599e16a05ae1cae06d3236aedcc8f5490fb0af744fc7bdc60671ca900f163b545be9156ea55c0cdba5ad38e9619aa97abf69decb7e37b90bf
|
7
|
+
data.tar.gz: be476950872ad2fcbd4605dacb1dc2e7690189a90e5e1276e8d2db8feeb6a38757a6b2d72e1e45a704af19c289400858eb354f550eb33ee39a3fcc1f738e2678
|
data/Gemfile.lock
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws_site_monitor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Ayre
|
@@ -126,8 +126,8 @@ description: Monitor sites hosted on AWS, restart ec2 machines when they go down
|
|
126
126
|
email:
|
127
127
|
- jasonayre@gmail.com
|
128
128
|
executables:
|
129
|
+
- aws_site_monitor
|
129
130
|
- console
|
130
|
-
- monitor
|
131
131
|
- setup
|
132
132
|
extensions: []
|
133
133
|
extra_rdoc_files: []
|
@@ -141,15 +141,13 @@ files:
|
|
141
141
|
- README.md
|
142
142
|
- Rakefile
|
143
143
|
- aws_site_monitor.gemspec
|
144
|
+
- bin/aws_site_monitor
|
144
145
|
- bin/console
|
145
|
-
- bin/monitor
|
146
146
|
- bin/setup
|
147
147
|
- lib/aws/site_monitor.rb
|
148
148
|
- lib/aws/site_monitor/cli.rb
|
149
|
-
- lib/aws/site_monitor/manage.rb
|
150
149
|
- lib/aws/site_monitor/pstore_record.rb
|
151
150
|
- lib/aws/site_monitor/version.rb
|
152
|
-
- lib/aws/version.rb
|
153
151
|
homepage: https://github.com/jasonayre/aws_site_monitor
|
154
152
|
licenses:
|
155
153
|
- MIT
|
@@ -1,23 +0,0 @@
|
|
1
|
-
module Aws
|
2
|
-
module SiteMonitor
|
3
|
-
class Manage < ::Thor
|
4
|
-
option :url, :type => :string, :desc => 'URL to watch'
|
5
|
-
option :instance_ids, :type => :array, :desc => 'AWS Instance IDS to restart when non 200 response is detected'
|
6
|
-
|
7
|
-
desc "add", "Add a site to the watch list"
|
8
|
-
def add
|
9
|
-
site = ::Aws::SiteMonitor::Site.create(:url => options.url, :instance_ids => options.instance_ids)
|
10
|
-
puts "added #{options[:url]} to watchlist"
|
11
|
-
end
|
12
|
-
|
13
|
-
option :url, :type => :string, :desc => 'URL to remove from watchlist'
|
14
|
-
desc "remove", "Remove a site from the watch list"
|
15
|
-
def remove
|
16
|
-
site = ::Aws::SiteMonitor::Site.find_by(:url => options.url)
|
17
|
-
raise ::StandardError.new("SiteNotFound #{options.url}") if !site
|
18
|
-
site.destroy
|
19
|
-
puts "removed #{site[:url]} from watchlist"
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|