fluent-plugin-parser-winevt_xml 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ee87b2aba2bb075ae2eccb709a087e7f1f9aa68c4ea7d888e4028a0440878e3c
4
- data.tar.gz: 5cc6013edc37cc5a1e38afafea4c7c67f5bfea7b199a75a13cf7997a619d61e7
3
+ metadata.gz: 7411e3cffa23808b75834b504b3c72aef7d9d23ad2d39a26455b9e7ff5a3c3ae
4
+ data.tar.gz: 71cdf36beee23db60f832a6aad6544e06799df70e2863fd9eea5ce28ea653b69
5
5
  SHA512:
6
- metadata.gz: 70b3c74b625a4e2f5bc559623f108a1f9fd60317d630ba62be89df35b31149338ec663b40bf1722f94bbae5e95452938aa7a3d784675e3d943f417dc2fd3cb26
7
- data.tar.gz: 4c8a1a359397d56af43e944377c8a88933809a22e0804a0bd85dc7d9d32a85ffdc749ed41a16ff04394b80f09fa49565b8af62e8199bf8b7a56df9837c06632d
6
+ metadata.gz: bafcecd0c1e43f66fd96250a9f0c0268389534324091c1b67813bec7474d93f88b4c7869d6cada2ec79f1733c319d2a14d9fc9cc1089cb1b3324a75dc12126d6
7
+ data.tar.gz: ac0d44e0f2680dc364d377f94aca62b94e384441ab4c05b81f115b4963aecaf2baed8945725d21ac3b06d5bb166dcadf08c4ed0def8bf226779ac5603fdb47ad
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "fluent-plugin-parser-winevt_xml"
7
- spec.version = "0.1.1"
7
+ spec.version = "0.1.2"
8
8
  spec.authors = ["Hiroshi Hatake", "Masahiro Nakagawa"]
9
9
  spec.email = ["cosmo0920.oucc@gmail.com", "repeatedly@gmail.com"]
10
10
  spec.summary = %q{Fluentd Parser plugin to parse XML rendered windows event log.}
@@ -5,6 +5,10 @@ module Fluent::Plugin
5
5
  class WinevtXMLparser < Parser
6
6
  Fluent::Plugin.register_parser('winevt_xml', self)
7
7
 
8
+ def winevt_xml?
9
+ true
10
+ end
11
+
8
12
  def parse(text)
9
13
  record = {}
10
14
  doc = Nokogiri::XML(text)
@@ -26,7 +30,6 @@ module Fluent::Plugin
26
30
  record["Computer"] = (system_elem/"Computer").text rescue nil
27
31
  record["UserID"] = (system_elem/'Security').attribute("UserID").text rescue nil
28
32
  record["Version"] = (system_elem/'Version').text rescue nil
29
- record["InsertStrings"] = [] # These parameters are processed in winevt_c.
30
33
  time = @estimate_current_event ? Fluent::EventTime.now : nil
31
34
  yield time, record
32
35
  end
@@ -32,10 +32,11 @@ class WinevtXMLparserTest < Test::Unit::TestCase
32
32
  "Channel" => "Security",
33
33
  "Computer" => "Fluentd-Developing-Windows",
34
34
  "UserID" => nil,
35
- "Version" => "2",
36
- "InsertStrings" => []}
35
+ "Version" => "2",}
37
36
  d.instance.parse(xml) do |time, record|
38
37
  assert_equal(expected, record)
39
38
  end
39
+
40
+ assert_true(d.instance.winevt_xml?)
40
41
  end
41
42
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-parser-winevt_xml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroshi Hatake