logstash-codec-mtrraw 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/logstash/codecs/mtrraw.rb +2 -12
- data/logstash-codec-mtrraw.gemspec +3 -3
- metadata +5 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ded7731aa2be5afc77a19998142b9bf7dcadf885
|
4
|
+
data.tar.gz: c227d14652a194ff74b9948080ab05ccf5ec13e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3c1951eea1d3ae61c88ad8873fd468f855b985b3ec54917ef797861b85ee080db6f0ea5b5953523767a341d3a05cc8781afa295c900b62e226e43319f993c3d
|
7
|
+
data.tar.gz: 076ed3f087d204da0863c96f3fc79d8b3537e0d74b82a06a608c80e5ddf7cb9062735830dbc162d181abd52de5856be7fc3bf4c954b6ca6e1c28c9ce78878a2b
|
@@ -6,15 +6,6 @@ require "securerandom"
|
|
6
6
|
require "digest"
|
7
7
|
require 'awesome_print'
|
8
8
|
|
9
|
-
|
10
|
-
# This codec presumes you've somehow sent in the equivalent of this
|
11
|
-
# bash one-liner:
|
12
|
-
# (echo "S MYTARGET" ; mtr --raw -c <samplecount> 8.8.8.8) | awk '{printf $1";"}'
|
13
|
-
# You can get that into logstash any way you want, e.g. netcat will
|
14
|
-
# work if you set up a tcp input:
|
15
|
-
# (echo "S MYTARGET" ; mtr --raw -c <samplecount> 8.8.8.8) | awk '{printf $1";"}' | nc <myserver> <myport>
|
16
|
-
#
|
17
|
-
|
18
9
|
class MtrRec
|
19
10
|
attr_accessor :type,:id,:data
|
20
11
|
def initialize(line)
|
@@ -114,7 +105,7 @@ class LogStash::Codecs::Mtrraw < LogStash::Codecs::Base
|
|
114
105
|
"Z_node" => hops[0][:addr],
|
115
106
|
"dns" => origin,
|
116
107
|
"avgrtt" => 0,
|
117
|
-
"
|
108
|
+
"pingloss" => 0
|
118
109
|
})
|
119
110
|
0.upto(path.size - 2) {
|
120
111
|
|index|
|
@@ -128,12 +119,11 @@ class LogStash::Codecs::Mtrraw < LogStash::Codecs::Base
|
|
128
119
|
"Z_node" => hops[index + 1][:addr],
|
129
120
|
"dns" => hops[index + 1][:dns],
|
130
121
|
"avgrtt" => hops[index + 1][:avgrtt],
|
131
|
-
"
|
122
|
+
"pingloss" => hops[index + 1][:pingloss]
|
132
123
|
})
|
133
124
|
}
|
134
125
|
end # def decode
|
135
126
|
|
136
|
-
# Encode a single event, this returns the raw data to be returned as a String
|
137
127
|
def encode_sync(event)
|
138
128
|
# Nothing to do.
|
139
129
|
@on_event.call(event, event)
|
@@ -1,9 +1,9 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-codec-mtrraw'
|
3
|
-
s.version = '0.2.
|
3
|
+
s.version = '0.2.3'
|
4
4
|
s.licenses = ['Apache License (2.0)']
|
5
|
-
s.summary = 'Converts
|
6
|
-
s.description = '
|
5
|
+
s.summary = 'Converts mtr --raw route trace data to logstash events'
|
6
|
+
s.description = 'Renders wholepath and hop record types from mtr --raw path trace data'
|
7
7
|
s.homepage = 'https://github.com/svdasein/logstash-codec-mtrraw'
|
8
8
|
s.authors = ['svdasein']
|
9
9
|
s.email = 'daveparker01@gmail.com'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-codec-mtrraw
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- svdasein
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logstash-core-plugin-api
|
@@ -52,8 +52,7 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
-
description:
|
56
|
-
docs
|
55
|
+
description: Renders wholepath and hop record types from mtr --raw path trace data
|
57
56
|
email: daveparker01@gmail.com
|
58
57
|
executables: []
|
59
58
|
extensions: []
|
@@ -92,11 +91,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
92
91
|
version: '0'
|
93
92
|
requirements: []
|
94
93
|
rubyforge_project:
|
95
|
-
rubygems_version: 2.
|
94
|
+
rubygems_version: 2.6.11
|
96
95
|
signing_key:
|
97
96
|
specification_version: 4
|
98
|
-
summary: Converts
|
97
|
+
summary: Converts mtr --raw route trace data to logstash events
|
99
98
|
test_files:
|
100
99
|
- spec/codecs/mtrraw_spec.rb
|
101
100
|
- spec/spec_helper.rb
|
102
|
-
has_rdoc:
|