deadman_check 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +18 -15
- data/deadman_check.gemspec +3 -3
- data/lib/deadman_check/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ea1ce99451bd5223168a7755de036f3aca76902
|
4
|
+
data.tar.gz: 1d2c3fb3aba11a4a263558682de9a2706e9ac701
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c22bb434ad1d1b09c61e80634ad512c777f03b2d84fa86c48b1d3f72743dd215d95944a513dfb8a8be6ce3dd143773015704ce475ffd953c1b6140b05872f672
|
7
|
+
data.tar.gz: 3fba3fd6897ba75bc6a4e48337001d4707ee42d7dfa8f28bd46935e071fe10e7735cb2a2ef2caabd5a2b735cb74f6a2475aa9a412c8adab852638df1f72c0825
|
data/README.md
CHANGED
@@ -5,8 +5,8 @@
|
|
5
5
|
|
6
6
|
A monitoring companion for Nomad periodic jobs that alerts if periodic jobs are
|
7
7
|
not processing as expected. The deadman-check has 2 modes, one to run with the
|
8
|
-
Nomad periodic job as an additional [task](https://www.nomadproject.io/docs/job-specification/task.html) to update a key in
|
9
|
-
is intended to run as a separate process that will monitor the
|
8
|
+
Nomad periodic job as an additional [task](https://www.nomadproject.io/docs/job-specification/task.html) to update a key in Consul with current EPOCH time. The other mode is of deadman-check
|
9
|
+
is intended to run as a separate process that will monitor the Consul key's EPOCH
|
10
10
|
time value and alert if that value fails to meet a time 'freshness' threshold that
|
11
11
|
is expected for that job.
|
12
12
|
|
@@ -44,7 +44,7 @@ job "SilverBulletPeriodic" {
|
|
44
44
|
```
|
45
45
|
|
46
46
|
To monitor the SilverBulletPeriodicProcess task let's add a deadmad-check task to
|
47
|
-
run post updates to a
|
47
|
+
run post updates to a Consul endpoint (10.0.0.1 for this example)
|
48
48
|
|
49
49
|
```hcl
|
50
50
|
job "SilverBulletPeriodic" {
|
@@ -90,6 +90,8 @@ job "SilverBulletPeriodic" {
|
|
90
90
|
}
|
91
91
|
```
|
92
92
|
|
93
|
+
<img width="1215" alt="screen shot 2017-03-26 at 3 28 50 pm" src="https://cloud.githubusercontent.com/assets/538171/24335809/276147ec-1239-11e7-83d8-0fca95bebdc2.png">
|
94
|
+
|
93
95
|
Now the key, deadman/SilverBulletPeriodicProcess, at 10.0.0.1 will be updated with
|
94
96
|
the EPOCH time for each SilverBulletPeriodic job run. If the job hangs or fails to run
|
95
97
|
we will know via the EPOCH time entry going stale.
|
@@ -133,8 +135,9 @@ job "DeadmanMonitoring" {
|
|
133
135
|
}
|
134
136
|
```
|
135
137
|
|
136
|
-
Monitor a
|
138
|
+
Monitor a Consul key that contains an EPOCH time entry. Send a Slack message if EPOCH age hits given threshold
|
137
139
|
|
140
|
+
<img width="752" alt="screen shot 2017-03-26 at 3 29 28 pm" src="https://cloud.githubusercontent.com/assets/538171/24335811/2e57eee8-1239-11e7-9fff-c8a10d956f2e.png">
|
138
141
|
|
139
142
|
# Non-Nomad Use:
|
140
143
|
|
@@ -171,14 +174,14 @@ $ deadman-check -h
|
|
171
174
|
|
172
175
|
DESCRIPTION:
|
173
176
|
|
174
|
-
Monitor a
|
177
|
+
Monitor a Consul key that contains an EPOCH time entry.
|
175
178
|
Send a Slack message if EPOCH age hits given threshold
|
176
179
|
|
177
180
|
COMMANDS:
|
178
181
|
|
179
182
|
help Display global or [command] help documentation
|
180
|
-
key_set Update a given
|
181
|
-
switch_monitor Target a
|
183
|
+
key_set Update a given Consul key with current EPOCH
|
184
|
+
switch_monitor Target a Consul key to monitor
|
182
185
|
|
183
186
|
GLOBAL OPTIONS:
|
184
187
|
|
@@ -211,19 +214,19 @@ $ deadman-check key_set -h
|
|
211
214
|
|
212
215
|
EXAMPLES:
|
213
216
|
|
214
|
-
# Update a
|
217
|
+
# Update a Consul key deadman/myservice, with current EPOCH time
|
215
218
|
deadman-check key_set --host 127.0.0.1 --port 8500 --key deadman/myservice
|
216
219
|
|
217
220
|
OPTIONS:
|
218
221
|
|
219
222
|
--host HOST
|
220
|
-
IP address or hostname of
|
223
|
+
IP address or hostname of Consul system
|
221
224
|
|
222
225
|
--port PORT
|
223
|
-
port
|
226
|
+
port Consul is listening on
|
224
227
|
|
225
228
|
--key KEY
|
226
|
-
|
229
|
+
Consul key to monitor
|
227
230
|
```
|
228
231
|
|
229
232
|
### Usage for switch_monitor command
|
@@ -245,7 +248,7 @@ $ deadman-check switch_monitor -h
|
|
245
248
|
|
246
249
|
EXAMPLES:
|
247
250
|
|
248
|
-
# Target a
|
251
|
+
# Target a Consul key deadman/myservice, and this key has an EPOCH
|
249
252
|
value to check looking to alert on 500 second or greater freshness
|
250
253
|
deadman-check switch_monitor \
|
251
254
|
--host 127.0.0.1 \
|
@@ -257,13 +260,13 @@ $ deadman-check switch_monitor -h
|
|
257
260
|
OPTIONS:
|
258
261
|
|
259
262
|
--host HOST
|
260
|
-
IP address or hostname of
|
263
|
+
IP address or hostname of Consul system
|
261
264
|
|
262
265
|
--port PORT
|
263
|
-
port
|
266
|
+
port Consul is listening on
|
264
267
|
|
265
268
|
--key KEY
|
266
|
-
|
269
|
+
Consul key to monitor
|
267
270
|
|
268
271
|
--freshness SECONDS
|
269
272
|
The value in seconds to alert on when the recorded
|
data/deadman_check.gemspec
CHANGED
@@ -9,11 +9,11 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["zane"]
|
10
10
|
spec.email = ["zane.williamson@gmail.com"]
|
11
11
|
|
12
|
-
spec.summary = %q{Monitor a
|
12
|
+
spec.summary = %q{Monitor a Consul key that contains an EPOCH time entry.
|
13
13
|
Send email if EPOCH age hits given threshold}
|
14
|
-
spec.description = %q{A script to check a given
|
14
|
+
spec.description = %q{A script to check a given Consul key EPOCH for
|
15
15
|
freshness. Good for monitoring cron jobs or batch jobs. Have the last step
|
16
|
-
of the job post the EPOCH time to target
|
16
|
+
of the job post the EPOCH time to target Consul key. This script will monitor
|
17
17
|
it for a given freshness value (difference in time now to posted EPOCH)}
|
18
18
|
spec.homepage = "https://github.com/sepulworld/deadman-check"
|
19
19
|
spec.license = "MIT"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deadman_check
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zane
|
@@ -127,9 +127,9 @@ dependencies:
|
|
127
127
|
- !ruby/object:Gem::Version
|
128
128
|
version: 1.2.4
|
129
129
|
description: |-
|
130
|
-
A script to check a given
|
130
|
+
A script to check a given Consul key EPOCH for
|
131
131
|
freshness. Good for monitoring cron jobs or batch jobs. Have the last step
|
132
|
-
of the job post the EPOCH time to target
|
132
|
+
of the job post the EPOCH time to target Consul key. This script will monitor
|
133
133
|
it for a given freshness value (difference in time now to posted EPOCH)
|
134
134
|
email:
|
135
135
|
- zane.williamson@gmail.com
|
@@ -180,6 +180,6 @@ rubyforge_project:
|
|
180
180
|
rubygems_version: 2.6.8
|
181
181
|
signing_key:
|
182
182
|
specification_version: 4
|
183
|
-
summary: Monitor a
|
183
|
+
summary: Monitor a Consul key that contains an EPOCH time entry. Send email if EPOCH
|
184
184
|
age hits given threshold
|
185
185
|
test_files: []
|