aggkit 0.4.7.15744 → 0.4.7.15796
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/bin/aggwrap +0 -49
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0acae442c0ca4a77a7635f596d77d2fb711b21be77df2add4cbb34dbde9770c5
|
4
|
+
data.tar.gz: 751ad965fb388ab5cfbd9d3bec3366f56bbb8175c205d08252c2e5837493a602
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72c001cbfa757d2d5921f902cc585941bdc9cb34f603b5333a90680fb13bf1a1127768f47d41db61b6890db1cf5189ffb81fa1782ac826c0280fa2341160f02d
|
7
|
+
data.tar.gz: 1cc07622088e181c437fe72be20c9657ffbd02ab87aa627dcb356e691f14a7fe7bb8ed0bec5c626b317dd80b2ef8fbdb4a4fb0a4d0a9f14349a405d0377a54a3
|
data/Gemfile.lock
CHANGED
data/bin/aggwrap
CHANGED
@@ -7,61 +7,12 @@ require 'net/http'
|
|
7
7
|
require 'uri'
|
8
8
|
require 'socket'
|
9
9
|
|
10
|
-
module Diplomat
|
11
|
-
|
12
|
-
# Methods for interacting with the Consul check API endpoint
|
13
|
-
class Check < Diplomat::RestClient
|
14
|
-
|
15
|
-
# Update a TTL check
|
16
|
-
# @param check_id [String] the unique id of the check
|
17
|
-
# @param status [String] status of the check. Valid values are "passing", "warning", and "critical"
|
18
|
-
# @param output [String] human-readable message will be passed through to the check's Output field
|
19
|
-
# @return [Integer] Status code
|
20
|
-
def update_ttl(check_id, status, output = nil)
|
21
|
-
ret = @conn.put do |req|
|
22
|
-
req.url "/v1/agent/check/update/#{check_id}"
|
23
|
-
req.body = JSON.generate('Status' => status, 'Output' => output)
|
24
|
-
end
|
25
|
-
ret.status == 200
|
26
|
-
end
|
27
|
-
|
28
|
-
# Pass a check
|
29
|
-
# @param check_id [String] the unique id of the check
|
30
|
-
# @param output [String] human-readable message will be passed through to the check's Output field
|
31
|
-
# @return [Integer] Status code
|
32
|
-
def pass(check_id, output = nil)
|
33
|
-
update_ttl(check_id, 'passing', output)
|
34
|
-
end
|
35
|
-
|
36
|
-
# Warn a check
|
37
|
-
# @param check_id [String] the unique id of the check
|
38
|
-
# @param output [String] human-readable message will be passed through to the check's Output field
|
39
|
-
# @return [Integer] Status code
|
40
|
-
def warn(check_id, output = nil)
|
41
|
-
update_ttl(check_id, 'warning', output)
|
42
|
-
end
|
43
|
-
|
44
|
-
# Fail a check
|
45
|
-
# @param check_id [String] the unique id of the check
|
46
|
-
# @param output [String] human-readable message will be passed through to the check's Output field
|
47
|
-
# @return [Integer] Status code
|
48
|
-
def fail(check_id, output = nil)
|
49
|
-
update_ttl(check_id, 'critical', output)
|
50
|
-
end
|
51
|
-
|
52
|
-
end
|
53
|
-
|
54
|
-
end
|
55
|
-
|
56
|
-
|
57
|
-
|
58
10
|
STDERR.sync
|
59
11
|
STDOUT.sync
|
60
12
|
|
61
13
|
UTIL = File.basename(__FILE__)
|
62
14
|
DEFAULT_RELOAD_INTERVAL = 60 # seconds
|
63
15
|
|
64
|
-
|
65
16
|
include Aggkit::Runner
|
66
17
|
|
67
18
|
consul_addr = Aggkit::Consul.build_consul_addr(addr: ENV['CONSUL_HTTP_ADDR'], host: ENV['CONSUL_HOST'], port: ENV['CONSUL_PORT'])
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aggkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.7.
|
4
|
+
version: 0.4.7.15796
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Godko Ivan
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-09-
|
12
|
+
date: 2019-09-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: diplomat
|