checkson 1.0 → 1.6
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/README.md +22 -2
- data/lib/checkson.rb +0 -0
- data/lib/checkson/apiclient.rb +3 -3
- data/lib/checkson/checks/base.rb +0 -0
- data/lib/checkson/checks/certificate.rb +1 -1
- data/lib/checkson/checks/dns.rb +0 -0
- data/lib/checkson/checks/packagemanagers/abstractpkgmgr.rb +0 -0
- data/lib/checkson/checks/packages.rb +0 -0
- data/lib/checkson/checks/process.rb +0 -0
- data/lib/checkson/checks/shell.rb +0 -0
- data/lib/checkson/config.rb +1 -0
- data/lib/checkson/context.rb +1 -0
- data/lib/checkson/ui.rb +0 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c386902ce53a7dc5f22c4b031122443c0906e02303ddac2789e01e174a72649
|
4
|
+
data.tar.gz: 8ea2d1a92101dd4505997739e6032274fc001d75fbd54d415cd157e073a09f51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77ad21c9c5beaa23cb75337eeda4fbf91d2609fc2522be1d99575f29f382d698792fcb01ad56e3946b60d00151255b8e68dbcdc0b2ac7a95d7075f20e8d5768b
|
7
|
+
data.tar.gz: 75a3dc66221a03904b0165358c971f3b24646ba66c11f4513cfe3e3ace5f99a29c4eb34a12f697291ab5a4d2adb755f027875e0556cc9c94ca87ff513acbf8a5
|
data/README.md
CHANGED
@@ -1,4 +1,24 @@
|
|
1
1
|
# Checkson
|
2
|
-
[](https://gitlab.fsrv.xyz/fsrv/checkson/commits/master)
|
3
|
-
[](https://badge.fury.io/rb/checkson)
|
4
2
|
|
3
|
+
## Basic information
|
4
|
+
|
5
|
+
Checkson is a simple framework for host and network checking. It supports multiple modules.
|
6
|
+
|
7
|
+
An example config will include multiple blocks, each for a singe test.
|
8
|
+
|
9
|
+
## Example configuration
|
10
|
+
|
11
|
+
```
|
12
|
+
check 'port 61000 is open' do
|
13
|
+
using Shell
|
14
|
+
set :code, %(sockstat -4 | grep \*:61000)
|
15
|
+
help 'Port 61000 is closed'
|
16
|
+
end
|
17
|
+
|
18
|
+
check 'ssh daemon is running' do
|
19
|
+
using Process
|
20
|
+
set :name, 'sshd'
|
21
|
+
help 'Enable and start sshd'
|
22
|
+
end
|
23
|
+
|
24
|
+
```
|
data/lib/checkson.rb
CHANGED
File without changes
|
data/lib/checkson/apiclient.rb
CHANGED
@@ -10,8 +10,8 @@ require 'logger'
|
|
10
10
|
|
11
11
|
module Checkson
|
12
12
|
class APIClient
|
13
|
-
attr_reader :apiaddr
|
14
|
-
|
13
|
+
attr_reader :apiaddr, :outfile
|
14
|
+
|
15
15
|
def initialize(apiaddr, outfile)
|
16
16
|
@apiaddr = apiaddr
|
17
17
|
@outfile = outfile
|
@@ -51,7 +51,7 @@ module Checkson
|
|
51
51
|
private
|
52
52
|
|
53
53
|
def remove_empty_lines(string)
|
54
|
-
regex =
|
54
|
+
regex = /^\s]$\n/
|
55
55
|
string.gsub(regex, '')
|
56
56
|
end
|
57
57
|
|
data/lib/checkson/checks/base.rb
CHANGED
File without changes
|
@@ -24,8 +24,8 @@ module Checkson
|
|
24
24
|
|
25
25
|
def file_check
|
26
26
|
require 'openssl'
|
27
|
-
raw = File.read @opts[:certfile] if File.file? @opts[:certfile]
|
28
27
|
begin
|
28
|
+
raw = File.read @opts[:certfile] if File.file? @opts[:certfile]
|
29
29
|
certificate = OpenSSL::X509::Certificate.new raw
|
30
30
|
cert_check certificate
|
31
31
|
rescue StandardError
|
data/lib/checkson/checks/dns.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/checkson/config.rb
CHANGED
data/lib/checkson/context.rb
CHANGED
data/lib/checkson/ui.rb
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: checkson
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.6'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Bauer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A simple framework for checking node facts
|
14
14
|
email: florian@fsrv.xyz
|
@@ -43,14 +43,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
43
43
|
requirements:
|
44
44
|
- - ">="
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: '
|
46
|
+
version: '2.6'
|
47
47
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
48
48
|
requirements:
|
49
49
|
- - ">="
|
50
50
|
- !ruby/object:Gem::Version
|
51
51
|
version: '0'
|
52
52
|
requirements: []
|
53
|
-
rubygems_version: 3.1.
|
53
|
+
rubygems_version: 3.1.4
|
54
54
|
signing_key:
|
55
55
|
specification_version: 4
|
56
56
|
summary: A simple framework for checking
|