fluent-plugin-juniper-telemetry 0.2.10 → 0.2.11
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.
- data/lib/fluent/plugin/parser_juniper_jti.rb +42 -0
- metadata +6 -6
@@ -2,6 +2,7 @@ require 'juniper_telemetry_lib.rb'
|
|
2
2
|
require 'protobuf'
|
3
3
|
require 'jvision_top.pb.rb'
|
4
4
|
require 'port.pb.rb'
|
5
|
+
require 'lsp_stats.pb.rb'
|
5
6
|
require 'logical_port.pb.rb'
|
6
7
|
require 'firewall.pb.rb'
|
7
8
|
|
@@ -146,6 +147,47 @@ module Fluent
|
|
146
147
|
# $log.debug "Unable to parse " + sensor + " sensor, Data Dump : " + datas.inspect.to_s
|
147
148
|
# end
|
148
149
|
# end
|
150
|
+
#####################################################################
|
151
|
+
### Support for resource /junos/services/label-switched-path/usage/##
|
152
|
+
#####################################################################
|
153
|
+
#datas Dump : {"name"=>"to_mx104-9", "instance_identifier"=>0,
|
154
|
+
# "counter_name"=>"c-25", "packets"=>2521648779, "bytes"=>2526692076558,
|
155
|
+
# "packet_rate"=>598640, "byte_rate"=>599837511}
|
156
|
+
elsif sensor == "jnpr_lsp_statistics_ext"
|
157
|
+
|
158
|
+
resource = "/junos/services/label-switched-path/usage/"
|
159
|
+
|
160
|
+
datas_sensors[sensor]['lsp_stats_records'].each do |datas|
|
161
|
+
|
162
|
+
# Save all info extracted on a list
|
163
|
+
sensor_data = []
|
164
|
+
|
165
|
+
begin
|
166
|
+
## Extract interface name and clean up
|
167
|
+
sensor_data.push({ 'device' => device_name })
|
168
|
+
sensor_data.push({ 'lspname' => datas['name'] })
|
169
|
+
sensor_data.push({ 'instance_identifier' => datas['instance_identifier'] })
|
170
|
+
sensor_data.push({ 'counter_name' => datas['counter_name'] })
|
171
|
+
|
172
|
+
## Clean up Current object
|
173
|
+
datas.delete("name")
|
174
|
+
datas.delete("instance_identifier")
|
175
|
+
datas.delete("counter_name")
|
176
|
+
|
177
|
+
datas.each do |type, value|
|
178
|
+
|
179
|
+
sensor_data.push({ 'type' => 'lsp_stats.' + type })
|
180
|
+
sensor_data.push({ 'value' => value })
|
181
|
+
|
182
|
+
record = build_record(output_format, sensor_data)
|
183
|
+
yield gpb_time, record
|
184
|
+
|
185
|
+
end
|
186
|
+
rescue => e
|
187
|
+
$log.warn "Unable to parse " + sensor + " sensor, Error during processing: #{$!}"
|
188
|
+
$log.debug "Unable to parse " + sensor + " sensor, Data Dump : " + datas_sensors.inspect.to_s
|
189
|
+
end
|
190
|
+
end
|
149
191
|
|
150
192
|
##############################################################
|
151
193
|
### Support for resource /junos/system/linecard/interface/logical/usage ##
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-juniper-telemetry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.11
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-04-
|
12
|
+
date: 2016-04-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fluentd
|
@@ -67,16 +67,16 @@ executables: []
|
|
67
67
|
extensions: []
|
68
68
|
extra_rdoc_files: []
|
69
69
|
files:
|
70
|
-
- lib/fluent/plugin/parser_juniper_na.rb
|
71
|
-
- lib/fluent/plugin/parser_juniper_analyticsd.rb
|
72
70
|
- lib/fluent/plugin/parser_juniper_jti.rb
|
71
|
+
- lib/fluent/plugin/parser_juniper_analyticsd.rb
|
72
|
+
- lib/fluent/plugin/parser_juniper_na.rb
|
73
73
|
- lib/juniper_telemetry_lib.rb
|
74
74
|
- lib/jvision_top.pb.rb
|
75
|
-
- lib/logical_port.pb.rb
|
76
|
-
- lib/lsp_stats.pb.rb
|
77
75
|
- lib/port.pb.rb
|
78
76
|
- lib/firewall.pb.rb
|
79
77
|
- lib/lsp_mon.pb.rb
|
78
|
+
- lib/logical_port.pb.rb
|
79
|
+
- lib/lsp_stats.pb.rb
|
80
80
|
- lib/google/protobuf/descriptor.pb.rb
|
81
81
|
homepage: https://github.com/JNPRAutomate/fluentd-plugin-juniper-telemetry
|
82
82
|
licenses:
|