fluent-plugin-filecounts 0.1.0 → 0.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b1a6d99f4306d317c728d99fb6a3ff350fa1b706
4
- data.tar.gz: 894c762c08835ee439937c9e34c04222632dda1a
3
+ metadata.gz: 12f51f94304032c5396185dab18147b321d618c4
4
+ data.tar.gz: a15829c2041b164e14c973c43638de37bc4eae80
5
5
  SHA512:
6
- metadata.gz: 9bb76d321992bfd0c35b25758ae3b507b8ad3a097c07f8ba3ef37e30d6f0b35ff64fd3c92acd53f36c103cffeae455359ae5e6157b7cabd4a01b1942209fda6b
7
- data.tar.gz: 166f9ec3806205e030b8b0a90df8521fd0b8b5fc27929725b3fc5642a53e22573bfa91f9e0875bc20c2589990df646ec8b4484ff5215a812ab9b7f66919ca587
6
+ metadata.gz: d4111c16326c3b2adb1016781d1cafa4473a5e58d653f87bafa1d1c35349f495f8b81242e137f6f236ed665bb85f8f15aac211c7f20c9f831155cad065e91cd1
7
+ data.tar.gz: 1c99d4f3769268394acf8abd5962295b16edb368515ec882c0bfff88c334de193ff2cb55aee03d568edea87af7417392f4f7680da64a6fb0e723bd8f50c9b3fe
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = "fluent-plugin-filecounts"
6
- spec.version = "0.1.0"
6
+ spec.version = "0.1.1"
7
7
  spec.authors = ["Zsolt Fekete"]
8
8
  spec.email = ["zsoltf@me.com"]
9
9
 
@@ -45,6 +45,7 @@ module Fluent
45
45
 
46
46
  begin
47
47
 
48
+ event_time = Time.now.strftime('%FT%T%:z')
48
49
  time_started = Engine.now
49
50
  command = "bash -c '\\find #@path -name \".*\" -prune -o -print'"
50
51
  files = IO.popen(command)
@@ -57,11 +58,11 @@ module Fluent
57
58
 
58
59
  es = MultiEventStream.new
59
60
 
60
- es.add(Engine.now, { "command" => command, "time_to_run" => (time_finished.to_i - time_started.to_i) })
61
+ es.add(Engine.now, { "time" => event_time, "command" => command, "time_to_run" => (time_finished.to_i - time_started.to_i) })
61
62
  groups = files.group_by {|e| File.dirname(e) }
62
63
  counts = Hash[groups.map{|k,v| [k, v.count]}]
63
64
  time = Engine.now
64
- counts.each {|k,v| es.add(time, Hash[ 'path', k, 'count', v ]) }
65
+ counts.each {|k,v| es.add(time, Hash[ 'time', event_time, 'path', k, 'count', v ]) }
65
66
 
66
67
  router.emit_stream(tag, es)
67
68
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-filecounts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zsolt Fekete