watchmonkey_cli 1.13.0 → 1.14.0
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/VERSION +1 -1
- data/checksums/watchmonkey_cli-1.13.0.gem.sha512 +1 -0
- data/lib/watchmonkey_cli/checker.rb +8 -0
- data/lib/watchmonkey_cli/checkers/dev_pry.rb +1 -0
- data/lib/watchmonkey_cli/checkers/ftp_availability.rb +1 -1
- data/lib/watchmonkey_cli/checkers/mysql_replication.rb +5 -1
- data/lib/watchmonkey_cli/checkers/ssl_expiration.rb +5 -1
- data/lib/watchmonkey_cli/checkers/tcp_port.rb +4 -1
- data/lib/watchmonkey_cli/checkers/ts3_license.rb +3 -1
- data/lib/watchmonkey_cli/checkers/udp_port.rb +4 -1
- data/lib/watchmonkey_cli/checkers/unix_cpu_governor.rb +3 -1
- data/lib/watchmonkey_cli/checkers/unix_defaults.rb +7 -1
- data/lib/watchmonkey_cli/checkers/unix_df.rb +3 -1
- data/lib/watchmonkey_cli/checkers/unix_file_exists.rb +3 -1
- data/lib/watchmonkey_cli/checkers/unix_load.rb +3 -1
- data/lib/watchmonkey_cli/checkers/unix_mdadm.rb +3 -1
- data/lib/watchmonkey_cli/checkers/unix_memory.rb +4 -2
- data/lib/watchmonkey_cli/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: eca45a77465ff32cc6166c9c97ae857e411a00020d274154278006d0a3c06cbc
|
|
4
|
+
data.tar.gz: 5468bb0a67d96d3533bdd643ba81555304b9951bee3aa0ef3a63815ad1b1dda2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ad691ffdc29b81ca2c07f5a483aea72bc4414932e558b41f0d97ac1be7a5f4664eff6f3c4d8b7d224c45f663c3bafe20c7c05699264c44a49a3585830276e2dd
|
|
7
|
+
data.tar.gz: ec9598dd812eb9da77bc53b9a12e3838b9f161e56a2f93af24188bab336532c0b4b61842aaa350eca27ec9b2461c3a6172dccdaeaba0473274df2449c264f46c
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.
|
|
1
|
+
1.14.0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
7cf1f0f16532184d11682df569b8c78da903166820e5355275bda41b76519e3bf021d8713cbe916b55f6d8c739b2a9af21136fb3aa0e14126ab7533b74a37de2
|
|
@@ -5,6 +5,7 @@ module WatchmonkeyCli
|
|
|
5
5
|
self.maxrt = false
|
|
6
6
|
|
|
7
7
|
def enqueue host, opts = {}
|
|
8
|
+
opts = {}.merge(self.class.default_options, opts)
|
|
8
9
|
host = app.fetch_connection(:loopback, :local) if !host || host == :local
|
|
9
10
|
host = app.fetch_connection(:ssh, host) if host.is_a?(Symbol)
|
|
10
11
|
app.enqueue(self, host, opts)
|
|
@@ -4,7 +4,11 @@ module WatchmonkeyCli
|
|
|
4
4
|
self.checker_name = "mysql_replication"
|
|
5
5
|
|
|
6
6
|
def enqueue host, opts = {}
|
|
7
|
-
opts = {
|
|
7
|
+
opts = {
|
|
8
|
+
host: "127.0.0.1",
|
|
9
|
+
user: "root",
|
|
10
|
+
sbm_threshold: 60,
|
|
11
|
+
}.merge(self.class.default_options, opts)
|
|
8
12
|
host = app.fetch_connection(:loopback, :local) if !host || host == :local
|
|
9
13
|
host = app.fetch_connection(:ssh, host) if host.is_a?(Symbol)
|
|
10
14
|
app.enqueue(self, host, opts)
|
|
@@ -4,7 +4,11 @@ module WatchmonkeyCli
|
|
|
4
4
|
self.checker_name = "ssl_expiration"
|
|
5
5
|
|
|
6
6
|
def enqueue page, opts = {}
|
|
7
|
-
opts = {
|
|
7
|
+
opts = {
|
|
8
|
+
threshold: 28.days,
|
|
9
|
+
verify: true,
|
|
10
|
+
timeout: 20,
|
|
11
|
+
}.merge(self.class.default_options, opts)
|
|
8
12
|
app.enqueue(self, page, opts)
|
|
9
13
|
end
|
|
10
14
|
|
|
@@ -4,7 +4,10 @@ module WatchmonkeyCli
|
|
|
4
4
|
self.checker_name = "tcp_port"
|
|
5
5
|
|
|
6
6
|
def enqueue host, port, opts = {}
|
|
7
|
-
opts = {
|
|
7
|
+
opts = {
|
|
8
|
+
message: "Port #{port} (TCP) is not reachable!",
|
|
9
|
+
timeout: 2
|
|
10
|
+
}.merge(self.class.default_options, opts)
|
|
8
11
|
host = app.fetch_connection(:loopback, :local) if !host || host == :local
|
|
9
12
|
host = app.fetch_connection(:ssh, host) if host.is_a?(Symbol)
|
|
10
13
|
app.enqueue(self, host, port, opts)
|
|
@@ -4,7 +4,9 @@ module WatchmonkeyCli
|
|
|
4
4
|
self.checker_name = "ts3_license"
|
|
5
5
|
|
|
6
6
|
def enqueue host, file, opts = {}
|
|
7
|
-
opts = {
|
|
7
|
+
opts = {
|
|
8
|
+
threshold: 1.month,
|
|
9
|
+
}.merge(self.class.default_options, opts)
|
|
8
10
|
host = app.fetch_connection(:loopback, :local) if !host || host == :local
|
|
9
11
|
host = app.fetch_connection(:ssh, host) if host.is_a?(Symbol)
|
|
10
12
|
app.enqueue(self, host, file, opts)
|
|
@@ -4,7 +4,10 @@ module WatchmonkeyCli
|
|
|
4
4
|
self.checker_name = "udp_port"
|
|
5
5
|
|
|
6
6
|
def enqueue host, port, opts = {}
|
|
7
|
-
opts = {
|
|
7
|
+
opts = {
|
|
8
|
+
message: "Port #{port} (UDP) is not reachable!",
|
|
9
|
+
timeout: 2,
|
|
10
|
+
}.merge(self.class.default_options, opts)
|
|
8
11
|
host = app.fetch_connection(:loopback, :local) if !host || host == :local
|
|
9
12
|
host = app.fetch_connection(:ssh, host) if host.is_a?(Symbol)
|
|
10
13
|
app.enqueue(self, host, port, opts)
|
|
@@ -4,7 +4,9 @@ module WatchmonkeyCli
|
|
|
4
4
|
self.checker_name = "unix_cpu_governor"
|
|
5
5
|
|
|
6
6
|
def enqueue host, opts = {}
|
|
7
|
-
opts = {
|
|
7
|
+
opts = {
|
|
8
|
+
expect: "performance",
|
|
9
|
+
}.merge(self.class.default_options, opts)
|
|
8
10
|
host = app.fetch_connection(:loopback, :local) if !host || host == :local
|
|
9
11
|
host = app.fetch_connection(:ssh, host) if host.is_a?(Symbol)
|
|
10
12
|
app.enqueue(self, host, opts)
|
|
@@ -5,7 +5,13 @@ module WatchmonkeyCli
|
|
|
5
5
|
|
|
6
6
|
def enqueue host, opts = {}
|
|
7
7
|
return if app.running? # we only ever want to run this once to spawn sub checkers
|
|
8
|
-
opts = {
|
|
8
|
+
opts = {
|
|
9
|
+
unix_load: {},
|
|
10
|
+
unix_memory: {},
|
|
11
|
+
unix_df: {},
|
|
12
|
+
unix_mdadm: {},
|
|
13
|
+
unix_cpu_governor: {},
|
|
14
|
+
}.merge(self.class.default_options, opts)
|
|
9
15
|
|
|
10
16
|
host = app.fetch_connection(:loopback, :local) if !host || host == :local
|
|
11
17
|
host = app.fetch_connection(:ssh, host) if host.is_a?(Symbol)
|
|
@@ -4,7 +4,9 @@ module WatchmonkeyCli
|
|
|
4
4
|
self.checker_name = "unix_df"
|
|
5
5
|
|
|
6
6
|
def enqueue host, opts = {}
|
|
7
|
-
opts = {
|
|
7
|
+
opts = {
|
|
8
|
+
min_percent: 25,
|
|
9
|
+
}.merge(self.class.default_options, opts)
|
|
8
10
|
host = app.fetch_connection(:loopback, :local) if !host || host == :local
|
|
9
11
|
host = app.fetch_connection(:ssh, host) if host.is_a?(Symbol)
|
|
10
12
|
app.enqueue(self, host, opts)
|
|
@@ -4,7 +4,9 @@ module WatchmonkeyCli
|
|
|
4
4
|
self.checker_name = "unix_file_exists"
|
|
5
5
|
|
|
6
6
|
def enqueue host, file, opts = {}
|
|
7
|
-
opts = {
|
|
7
|
+
opts = {
|
|
8
|
+
message: "File #{file} does not exist!",
|
|
9
|
+
}.merge(self.class.default_options, opts)
|
|
8
10
|
host = app.fetch_connection(:loopback, :local) if !host || host == :local
|
|
9
11
|
host = app.fetch_connection(:ssh, host) if host.is_a?(Symbol)
|
|
10
12
|
app.enqueue(self, host, file, opts)
|
|
@@ -4,7 +4,9 @@ module WatchmonkeyCli
|
|
|
4
4
|
self.checker_name = "unix_load"
|
|
5
5
|
|
|
6
6
|
def enqueue host, opts = {}
|
|
7
|
-
opts = {
|
|
7
|
+
opts = {
|
|
8
|
+
limits: [4, 2, 1.5],
|
|
9
|
+
}.merge(self.class.default_options, opts)
|
|
8
10
|
host = app.fetch_connection(:loopback, :local) if !host || host == :local
|
|
9
11
|
host = app.fetch_connection(:ssh, host) if host.is_a?(Symbol)
|
|
10
12
|
app.enqueue(self, host, opts)
|
|
@@ -4,7 +4,9 @@ module WatchmonkeyCli
|
|
|
4
4
|
self.checker_name = "unix_mdadm"
|
|
5
5
|
|
|
6
6
|
def enqueue host, opts = {}
|
|
7
|
-
opts = {
|
|
7
|
+
opts = {
|
|
8
|
+
log_checking: true,
|
|
9
|
+
}.merge(self.class.default_options, opts)
|
|
8
10
|
host = app.fetch_connection(:loopback, :local) if !host || host == :local
|
|
9
11
|
host = app.fetch_connection(:ssh, host) if host.is_a?(Symbol)
|
|
10
12
|
app.enqueue(self, host, opts)
|
|
@@ -4,7 +4,9 @@ module WatchmonkeyCli
|
|
|
4
4
|
self.checker_name = "unix_memory"
|
|
5
5
|
|
|
6
6
|
def enqueue host, opts = {}
|
|
7
|
-
opts = {
|
|
7
|
+
opts = {
|
|
8
|
+
min_percent: 25,
|
|
9
|
+
}.merge(self.class.default_options, opts)
|
|
8
10
|
host = app.fetch_connection(:loopback, :local) if !host || host == :local
|
|
9
11
|
host = app.fetch_connection(:ssh, host) if host.is_a?(Symbol)
|
|
10
12
|
app.enqueue(self, host, opts)
|
|
@@ -29,7 +31,7 @@ module WatchmonkeyCli
|
|
|
29
31
|
chunks = line.split(":").map(&:strip)
|
|
30
32
|
r[chunks[0]] = chunks[1].to_i
|
|
31
33
|
end
|
|
32
|
-
r["free"] = (
|
|
34
|
+
r["free"] = (r["MemAvailable"].to_i / r["MemTotal"].to_f * 100).round(2)
|
|
33
35
|
end
|
|
34
36
|
end
|
|
35
37
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: watchmonkey_cli
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.14.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sven Pachnit
|
|
@@ -70,6 +70,7 @@ files:
|
|
|
70
70
|
- bin/watchmonkey
|
|
71
71
|
- bin/watchmonkey.sh
|
|
72
72
|
- checksums/watchmonkey_cli-1.12.1.gem.sha512
|
|
73
|
+
- checksums/watchmonkey_cli-1.13.0.gem.sha512
|
|
73
74
|
- doc/checker_example.rb
|
|
74
75
|
- doc/config_example.rb
|
|
75
76
|
- lib/watchmonkey_cli.rb
|
|
@@ -122,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
122
123
|
- !ruby/object:Gem::Version
|
|
123
124
|
version: '0'
|
|
124
125
|
requirements: []
|
|
125
|
-
rubygems_version: 4.0.
|
|
126
|
+
rubygems_version: 4.0.22
|
|
126
127
|
specification_version: 4
|
|
127
128
|
summary: Watchmonkey CLI - dead simple agentless monitoring via SSH, HTTP, FTP, etc.
|
|
128
129
|
test_files: []
|