logstash-input-remote_proc 0.7.0 → 0.8.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/CHANGELOG.md +24 -0
- data/{CONTRIBUTORS → CONTRIBUTORS.md} +0 -0
- data/README.md +3 -0
- data/USAGE.md +37 -0
- data/lib/logstash/inputs/remote_proc.rb +5 -3
- data/logstash-input-remote_proc.gemspec +4 -5
- data/spec/inputs/remote_proc_spec.rb +1 -2
- metadata +23 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a010bf68dd597363d91b48e1ec8ca8382ceb079f
|
4
|
+
data.tar.gz: 2e5e21fc3012fc2b83246ad89c869f94fe5e6ae9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d47c1ef6f8d999216952664269ba85a91f58abd58a3e709edc5102c43b30ae4bcedcdbabf5e58f23d5f6ee7f8edeb9cc375ab8fbf60f0e524ba488819ff52b1f
|
7
|
+
data.tar.gz: 1787a3eaccd8c93cad687356f88ae4295bab73c555f2f5b9050551c33f73beb72f989e93232c8ad4a3d5581b200695635c631d852aeb554a19519bb631e58122
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,27 @@
|
|
1
|
+
## 0.8.0
|
2
|
+
- Add *server_tags* in server options.
|
3
|
+
|
4
|
+
## 0.7.0
|
5
|
+
- Code review: performance.
|
6
|
+
|
7
|
+
## 0.6.0
|
8
|
+
- Update USAGE.md.
|
9
|
+
|
10
|
+
## 0.5.0
|
11
|
+
- Fix /proc/stat parser for CPU data.
|
12
|
+
|
13
|
+
## 0.4.0
|
14
|
+
- Fix gem dependencies.
|
15
|
+
|
16
|
+
## 0.3.0
|
17
|
+
- Fix bug with logstash-core 5.1.1 with tests.
|
18
|
+
|
19
|
+
## 0.2.0
|
20
|
+
- Code review. Add comments
|
21
|
+
|
22
|
+
## 0.1.9
|
23
|
+
- Fix multiple procfs path.
|
24
|
+
|
1
25
|
## 0.1.8
|
2
26
|
- Add 'proc_prefix_path' for each server.
|
3
27
|
|
File without changes
|
data/README.md
CHANGED
@@ -2,6 +2,9 @@
|
|
2
2
|
|
3
3
|
[](https://travis-ci.org/fenicks/logstash-input-remote_proc)
|
4
4
|
|
5
|
+
|
6
|
+
> Looking for how to use this plugin, go to the [USAGE.md](https://github.com/fenicks/logstash-input-remote_proc/blob/master/USAGE.md) page.
|
7
|
+
|
5
8
|
This is a plugin for [Logstash](https://github.com/elastic/logstash).
|
6
9
|
|
7
10
|
It is fully free and fully open source. The license is Apache 2.0, meaning you are pretty much free to use it however you want in whatever way.
|
data/USAGE.md
CHANGED
@@ -20,6 +20,7 @@ servers => [
|
|
20
20
|
gateway_ssh_private_key => ... # :path (needed if no 'gateway_password'), empty by default
|
21
21
|
system_reader => "cat" # :string
|
22
22
|
proc_prefix_path => "/proc" # :string
|
23
|
+
server_tags => "traefik" # :string (could be comma separated text)
|
23
24
|
}
|
24
25
|
]
|
25
26
|
```
|
@@ -69,6 +70,7 @@ input {
|
|
69
70
|
}
|
70
71
|
}
|
71
72
|
```
|
73
|
+
|
72
74
|
### SSH server with specific system read command, 'cat' by default, and a specific procfs prefix path, '/proc' by default.
|
73
75
|
|
74
76
|
```javascript
|
@@ -103,6 +105,7 @@ input {
|
|
103
105
|
```
|
104
106
|
|
105
107
|
### With SSH server `host`, `port` and `username` and authenticate by password
|
108
|
+
|
106
109
|
```javascript
|
107
110
|
input {
|
108
111
|
remote_proc {
|
@@ -117,7 +120,9 @@ input {
|
|
117
120
|
}
|
118
121
|
}
|
119
122
|
```
|
123
|
+
|
120
124
|
### With SSH Gateway by with private key file and SSH `host` and `password`
|
125
|
+
|
121
126
|
```javascript
|
122
127
|
input {
|
123
128
|
remote_proc {
|
@@ -136,3 +141,35 @@ input {
|
|
136
141
|
}
|
137
142
|
}
|
138
143
|
```
|
144
|
+
|
145
|
+
### Use server_tags
|
146
|
+
|
147
|
+
```javascript
|
148
|
+
input {
|
149
|
+
remote_proc {
|
150
|
+
servers => [
|
151
|
+
{
|
152
|
+
host => "domain.com"
|
153
|
+
port => 22
|
154
|
+
username => "fenicks"
|
155
|
+
server_tags => "traefik, ha-proxy, nginx"
|
156
|
+
}
|
157
|
+
]
|
158
|
+
}
|
159
|
+
}
|
160
|
+
```
|
161
|
+
|
162
|
+
```javascript
|
163
|
+
input {
|
164
|
+
remote_proc {
|
165
|
+
servers => [
|
166
|
+
{
|
167
|
+
host => "domain.com"
|
168
|
+
port => 22
|
169
|
+
username => "fenicks"
|
170
|
+
server_tags => "rethinkdb"
|
171
|
+
}
|
172
|
+
]
|
173
|
+
}
|
174
|
+
}
|
175
|
+
```
|
@@ -1,4 +1,3 @@
|
|
1
|
-
# encoding: utf-8
|
2
1
|
require 'logstash/inputs/base'
|
3
2
|
require 'logstash/namespace'
|
4
3
|
require 'socket' # for Socket.gethostname
|
@@ -80,7 +79,8 @@ module LogStash
|
|
80
79
|
'gateway_password' => nil, # :string
|
81
80
|
'gateway_ssh_private_key' => nil, # :string
|
82
81
|
'system_reader' => 'cat', # :string
|
83
|
-
'proc_prefix_path' => '/proc' # :string
|
82
|
+
'proc_prefix_path' => '/proc', # :string
|
83
|
+
'server_tags' => nil # :string (comma separated list)
|
84
84
|
}.freeze
|
85
85
|
|
86
86
|
# Liste of commands for each `/proc` endpoints.
|
@@ -154,6 +154,7 @@ module LogStash
|
|
154
154
|
chan.exec(command) do |ch, success|
|
155
155
|
ch[:result_host] = ssh.properties['host']
|
156
156
|
ch[:result_port] = ssh.properties['port']
|
157
|
+
ch[:result_server_tags] = ssh.properties['server_tags']
|
157
158
|
unless success
|
158
159
|
@logger.warn('CHANNEL_EXEC_UNSUCCESS',
|
159
160
|
command: command,
|
@@ -184,7 +185,8 @@ module LogStash
|
|
184
185
|
remote_host: ch[:result_host],
|
185
186
|
remote_port: ch[:result_port],
|
186
187
|
command: command,
|
187
|
-
message: ch[:result_data]
|
188
|
+
message: ch[:result_data],
|
189
|
+
server_tags: ch[:result_server_tags]
|
188
190
|
)
|
189
191
|
decorate(event)
|
190
192
|
queue << event
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-input-remote_proc'
|
3
|
-
s.version = '0.
|
3
|
+
s.version = '0.8.0'
|
4
4
|
s.licenses = ['Apache-2.0']
|
5
5
|
s.summary = 'This Logstash plugin collects PROCFS metrics through remote SSH servers.'
|
6
6
|
s.description = 'This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program'
|
@@ -15,7 +15,6 @@ Gem::Specification.new do |s|
|
|
15
15
|
'vendor/**/*',
|
16
16
|
'*.gemspec',
|
17
17
|
'*.md',
|
18
|
-
'CONTRIBUTORS',
|
19
18
|
'Gemfile',
|
20
19
|
'LICENSE',
|
21
20
|
'NOTICE.TXT']
|
@@ -26,10 +25,10 @@ Gem::Specification.new do |s|
|
|
26
25
|
s.metadata = { 'logstash_plugin' => 'true', 'logstash_group' => 'input' }
|
27
26
|
|
28
27
|
# Gem dependencies
|
29
|
-
s.add_runtime_dependency 'logstash-core'
|
28
|
+
s.add_runtime_dependency 'logstash-core-plugin-api', '>= 1.60', '<= 2.99'
|
30
29
|
s.add_runtime_dependency 'logstash-codec-plain'
|
31
30
|
s.add_runtime_dependency 'net-ssh', '~> 2.9', '>= 2.9.2'
|
32
31
|
s.add_runtime_dependency 'net-ssh-gateway', '~> 1.2', '>= 1.2.0'
|
33
|
-
s.add_runtime_dependency 'stud'
|
34
|
-
s.add_development_dependency 'logstash-devutils'
|
32
|
+
s.add_runtime_dependency 'stud', '>= 0.0.22'
|
33
|
+
s.add_development_dependency 'logstash-devutils', '~> 1.3', '>= 1.3.1'
|
35
34
|
end
|
@@ -1,4 +1,3 @@
|
|
1
|
-
# encoding: utf-8
|
2
1
|
require 'logstash/devutils/rspec/spec_helper'
|
3
2
|
require 'logstash/inputs/remote_proc'
|
4
3
|
require 'net/ssh'
|
@@ -43,7 +42,7 @@ describe LogStash::Inputs::RemoteProc do
|
|
43
42
|
it '.register' do
|
44
43
|
ssh_gateway = spy('Net::SSH::Gateway')
|
45
44
|
expect(Net::SSH::Gateway).to receive(:new).with(any_args)
|
46
|
-
|
45
|
+
.and_return(ssh_gateway)
|
47
46
|
rp_gateway = described_class.new(
|
48
47
|
'servers' => [{ 'host' => 'localhost',
|
49
48
|
'port' => 22,
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-input-remote_proc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christian Kakesa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
15
15
|
requirements:
|
16
16
|
- - ">="
|
17
17
|
- !ruby/object:Gem::Version
|
18
|
-
version: '
|
19
|
-
|
18
|
+
version: '1.60'
|
19
|
+
- - "<="
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '2.99'
|
22
|
+
name: logstash-core-plugin-api
|
20
23
|
prerelease: false
|
21
24
|
type: :runtime
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
27
|
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
29
|
+
version: '1.60'
|
30
|
+
- - "<="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '2.99'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
requirement: !ruby/object:Gem::Requirement
|
29
35
|
requirements:
|
@@ -83,7 +89,7 @@ dependencies:
|
|
83
89
|
requirements:
|
84
90
|
- - ">="
|
85
91
|
- !ruby/object:Gem::Version
|
86
|
-
version:
|
92
|
+
version: 0.0.22
|
87
93
|
name: stud
|
88
94
|
prerelease: false
|
89
95
|
type: :runtime
|
@@ -91,21 +97,27 @@ dependencies:
|
|
91
97
|
requirements:
|
92
98
|
- - ">="
|
93
99
|
- !ruby/object:Gem::Version
|
94
|
-
version:
|
100
|
+
version: 0.0.22
|
95
101
|
- !ruby/object:Gem::Dependency
|
96
102
|
requirement: !ruby/object:Gem::Requirement
|
97
103
|
requirements:
|
104
|
+
- - "~>"
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: '1.3'
|
98
107
|
- - ">="
|
99
108
|
- !ruby/object:Gem::Version
|
100
|
-
version:
|
109
|
+
version: 1.3.1
|
101
110
|
name: logstash-devutils
|
102
111
|
prerelease: false
|
103
112
|
type: :development
|
104
113
|
version_requirements: !ruby/object:Gem::Requirement
|
105
114
|
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '1.3'
|
106
118
|
- - ">="
|
107
119
|
- !ruby/object:Gem::Version
|
108
|
-
version:
|
120
|
+
version: 1.3.1
|
109
121
|
description: This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program
|
110
122
|
email: christian@kakesa.net
|
111
123
|
executables: []
|
@@ -113,7 +125,7 @@ extensions: []
|
|
113
125
|
extra_rdoc_files: []
|
114
126
|
files:
|
115
127
|
- CHANGELOG.md
|
116
|
-
- CONTRIBUTORS
|
128
|
+
- CONTRIBUTORS.md
|
117
129
|
- Gemfile
|
118
130
|
- LICENSE
|
119
131
|
- NOTICE.TXT
|
@@ -504,7 +516,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
504
516
|
version: '0'
|
505
517
|
requirements: []
|
506
518
|
rubyforge_project:
|
507
|
-
rubygems_version: 2.
|
519
|
+
rubygems_version: 2.6.8
|
508
520
|
signing_key:
|
509
521
|
specification_version: 4
|
510
522
|
summary: This Logstash plugin collects PROCFS metrics through remote SSH servers.
|