logstash-input-remote_proc 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/logstash/inputs/remote_proc.rb +4 -6
- 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: 035fc8bc3778dcb99b27079eaf0d718d6046d52b
|
4
|
+
data.tar.gz: d33a58ba22ca37ac4de7e80d48714b99278e9b27
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83b1d89283ba50881e416746011b712bf63926c2397745f6233434f9808d61b5f62b5240921436c251c4d0cf51f6e520d36bb0bf5b4f8c6cd71a11233c0eb4ad
|
7
|
+
data.tar.gz: ec2b4d2a344848df5f17c3880970933e1084b435750c6a6253f2931c2c5aa6baf9ffe53e5fbd87a0eae28da572b7a1d9fe25d5a1b4ebe31c5c45c5ddacedc504
|
@@ -107,18 +107,16 @@ module LogStash
|
|
107
107
|
channel = ssh.open_channel do |chan|
|
108
108
|
chan.exec(command) do |ch, success|
|
109
109
|
next unless success
|
110
|
-
|
111
110
|
# "on_data" called when the process writes to stdout
|
112
111
|
ch.on_data { |_c, data| result_data << data }
|
113
|
-
|
114
112
|
# "on_extended_data", called when the process writes to stderr
|
115
113
|
ch.on_extended_data { |_ch, _type, data| error_data << data }
|
116
|
-
|
117
114
|
ch.on_close(&:close)
|
118
115
|
end
|
119
116
|
end
|
120
117
|
channel.wait
|
121
118
|
unless error_data.empty?
|
119
|
+
error_data.chomp!
|
122
120
|
error_data = error_data.force_encoding('UTF-8')
|
123
121
|
@logger.warn(error_data)
|
124
122
|
next
|
@@ -132,8 +130,8 @@ module LogStash
|
|
132
130
|
host: @host,
|
133
131
|
type: @type || "system-#{method}",
|
134
132
|
metric_name: "system-#{method}",
|
135
|
-
remote_host: channel.connection.
|
136
|
-
remote_port: channel.connection.
|
133
|
+
remote_host: channel.connection.options[:properties]['host'],
|
134
|
+
remote_port: channel.connection.options[:properties]['port'],
|
137
135
|
command: command,
|
138
136
|
message: result_data
|
139
137
|
)
|
@@ -164,7 +162,7 @@ module LogStash
|
|
164
162
|
@servers.each do |s|
|
165
163
|
prepare_servers!(s)
|
166
164
|
|
167
|
-
session_options = {}
|
165
|
+
session_options = { properties: s }
|
168
166
|
session_options[:port] = s['port'] if s['port']
|
169
167
|
session_options[:password] = s['password'] if s['password']
|
170
168
|
if s['ssh_private_key']
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-input-remote_proc'
|
3
|
-
s.version = '0.1.
|
3
|
+
s.version = '0.1.1'
|
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.1.
|
4
|
+
version: 0.1.1
|
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-11-
|
11
|
+
date: 2016-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|