maintainer 0.1.1 → 0.1.2

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +19 -8
  3. data/bin/maintainer +2 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d35e2a1657a6463105aad4b126e1e04e81afd0c7
4
- data.tar.gz: c6d74e6602046ecf046d6e4947557c74dac7abb4
3
+ metadata.gz: 952aa3ca16c4746ac9c8db1a3f6f446376badaef
4
+ data.tar.gz: 64af5fdc590baab2a8c89a51cf90619b1ce71749
5
5
  SHA512:
6
- metadata.gz: d21cf8b19bd0f7c6cedf2d12f76dae42d0fe234df66ff835ecf4b619f456a1a264c3cf278316614fc0bbc3af7f82f653b61a944612cdcd69a4ef721d8bb62ee8
7
- data.tar.gz: af0dc12bbccde28d34467a05567549382025154a945cae2a80f9ccef65e53a64e8b573828a0b5963694f9698e54ccbf26ef6c5a8940bcfe70c37ad3abb2a0691
6
+ metadata.gz: 778e00165c732ad5bfcf2adbf2ed777b40bc322042942b7d927368344ba5331f953ff790692a67879da1a1348f7803a8e4da25af4906714ec7ef3f9dbef9c055
7
+ data.tar.gz: 0e5b159f744c27a57bbcbade1d4ee2a87efa4b82d264e97e9bbb64460c98e5642617763eca5543941e3ac39b51990bea1b487a3bbc05f16af34617a75322c5a0
data/README.md CHANGED
@@ -14,22 +14,33 @@ maintainer --help
14
14
  Generates a maintenance event that you can inject into the Riemann index
15
15
  and use to indicate a host is in maintenance mode.
16
16
 
17
+ The state of the event defaults to `active` but you can specify an
18
+ alternate state with the `--event-state` flag.
19
+
20
+ The `:service` field defaults to `maintenance-mode` but can be
21
+ overridden with the `--event-service` flag. The host defaults to the
22
+ host the command is run on but can be overridden with the `--event-host`
23
+ flag.
24
+
17
25
  ### Starting maintenance
18
26
 
19
27
  ```
20
- maintainer --host riemann.example.com
21
- {:host server.example.com, :service maintenance-mode, :state
22
- active, :description Maintenance is active, :metric nil, :tags nil,
23
- :time 1457278453, :ttl Infinity}
28
+ maintainer --host riemann.example.com --event-service apache2
29
+ {:host server.example.com, :service apache2, :state
30
+ active, :description Maintenance is active, :type maintenance-mode, :metric nil,
31
+ :tags nil, :time 1457278453, :ttl Infinity}
24
32
  ```
25
33
 
34
+ You will see a new attribute called `:type` with a value of
35
+ `maintenance-mode` that you could also use for filtering.
36
+
26
37
  ### Ending maintenance
27
38
 
28
39
  ```
29
- maintainer --host riemann.example.com --event-state inactive
30
- {:host server.example.com, :service maintenance-mode, :state
31
- inactive, :description Maintenance is inactive, :metric nil, :tags nil,
32
- :time 1457278567, :ttl Infinity}
40
+ maintainer --host riemann.example.com --event-service apache2 --event-state inactive
41
+ {:host server.example.com, :service apache2, :state
42
+ inactive, :description Maintenance is inactive, :type maintenance-mode,
43
+ :metric nil, :tags nil, :time 1457278567, :ttl Infinity}
33
44
  ```
34
45
 
35
46
  ### Riemann configuration
@@ -13,7 +13,8 @@ class Maintainer
13
13
  end
14
14
 
15
15
  def run
16
- report(:service => options[:event_service],
16
+ report(:type => 'maintenance-mode',
17
+ :service => options[:event_service],
17
18
  :state => options[:event_state],
18
19
  :ttl => options[:ttl],
19
20
  :description => "Maintenance is #{options[:event_state]}")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maintainer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Turnbull
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-06 00:00:00.000000000 Z
11
+ date: 2016-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: riemann-tools