logstash-input-remote_proc 0.1.9 → 0.2.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/lib/logstash/inputs/remote_proc.rb +18 -3
- data/logstash-input-remote_proc.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e2da5e02a3c77fb94ec66fe6061a5f60ae3aee8
|
4
|
+
data.tar.gz: 1cd01b1862e72d11b0184818b7034eec7e668ef1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df842d3954bedee147addb1827a6581a16ab861b356cc9dab96e044617cfd1e163bbbebee4fbe72288c88b24d4b2771cb8f954ba39a27007fa9768af3b9ccf91
|
7
|
+
data.tar.gz: fc802e386c47601fb8eb3476a36f82222cf313320d51620e936d36acff2fe37bb29dfdad5c5f10f59ebb81e920f34368d2f5bc7372f29cb322a79360ed6a72c0
|
@@ -49,6 +49,21 @@ module LogStash
|
|
49
49
|
# proc_list => ["_all"]
|
50
50
|
# }
|
51
51
|
# }
|
52
|
+
#
|
53
|
+
# -------------------------------------------------------------------------
|
54
|
+
# Example with specific procfs prefix path and system reader for certain host.
|
55
|
+
# By default the system reader is 'cat' and the procfs prefix path is '/proc'.
|
56
|
+
# [source,ruby]
|
57
|
+
# -------------------------------------------------------------------------
|
58
|
+
# input {
|
59
|
+
# remote_proc {
|
60
|
+
# servers => [
|
61
|
+
# { host => "remote.server.com" username => "medium" system_reader => "dd bs=1 2>/dev/null" proc_prefix_path => "if=/proc"},
|
62
|
+
# { host => "h2.net" username => "poc" gateway_host => "h.gw.net" gateway_username => "user" }
|
63
|
+
# ]
|
64
|
+
# proc_list => ["stat", "meminfo"]
|
65
|
+
# }
|
66
|
+
# }
|
52
67
|
# -------------------------------------------------------------------------
|
53
68
|
#
|
54
69
|
class RemoteProc < LogStash::Inputs::Base
|
@@ -137,8 +152,6 @@ module LogStash
|
|
137
152
|
ssh.properties['_commands'].each do |method, command|
|
138
153
|
ssh.open_channel do |chan|
|
139
154
|
chan.exec(command) do |ch, success|
|
140
|
-
ch[:result_data] = String.new('')
|
141
|
-
ch[:result_error] = String.new('')
|
142
155
|
ch[:result_host] = ssh.properties['host']
|
143
156
|
ch[:result_port] = ssh.properties['port']
|
144
157
|
unless success
|
@@ -148,6 +161,8 @@ module LogStash
|
|
148
161
|
port: ch[:result_port])
|
149
162
|
next
|
150
163
|
end
|
164
|
+
ch[:result_data] = String.new('')
|
165
|
+
ch[:result_error] = String.new('')
|
151
166
|
# "on_data" called when the process writes to stdout
|
152
167
|
ch.on_data { |_c, data| ch[:result_data] << data }
|
153
168
|
ch.on_process do |_c|
|
@@ -212,7 +227,7 @@ module LogStash
|
|
212
227
|
else
|
213
228
|
COMMANDS.select { |k, _| @proc_list.include?(k.to_s) }
|
214
229
|
end
|
215
|
-
# Replace 'system_reader' and 'proc_prefix_path'
|
230
|
+
# Replace 'system_reader' and 'proc_prefix_path' for each host command
|
216
231
|
server['_commands'] = cmds.each do |k, v|
|
217
232
|
cmds[k] = v % { system_reader: server['system_reader'],
|
218
233
|
proc_prefix_path: server['proc_prefix_path'] }
|
@@ -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.2.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'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.2.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: 2016-12-
|
11
|
+
date: 2016-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|