fluent-plugin-redoop 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.gitignore +17 -0
- data/.rvmrc +1 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +1 -0
- data/fluent-plugin-redoop.gemspec +24 -0
- data/lib/fluent/plugin/out_redoop.rb +49 -0
- metadata +108 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
NWM3YzY2YWY0MzA0NDc5MzljMDU3MzdmNjE2MGM2NWUwY2VhMTdlYw==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
MzcxYjZhNzZiY2I3NDkwODgzMjE1Mzg3NGIwZmZkNTAwMjk3ZGU0Zg==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MGM3NDE4Mzk2ZTk1NDFkN2MwYTZjM2ZiOTVjYjQ0YTQzYzExNmE4OTEzOGQ0
|
10
|
+
YzI0MGFlOTBlMWUzNzhlMWI4NjgxMzMwNGRmMjljNDBhYTZhZmFlYmQwNGIw
|
11
|
+
ZTk3N2Y4ODdlMDY0N2M0Y2RmYTJiNjM1OWExYjYwNzBmZjdhNzQ=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
OGJiYjEyMjQxOTY2ZDhhNWI3N2ZkNjcyZTU5YjZlNTQzYTg1NzFhOWUzYjgx
|
14
|
+
Njk4ZWY3YTkwNWRhN2FhNTljMDMzYjRjNzY0NDAyZWIyMTE2M2ExNjNhMTk5
|
15
|
+
NGY2YWZjZDgxMDM3OTQ3YTVlZTc4M2U2ZmI2ZDBiYjEyMjBjZTY=
|
data/.gitignore
ADDED
data/.rvmrc
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
rvm use default@fluent-plugin-redoop
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Aaron Lunsford
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# Fluent::Plugin::Redoop
|
2
|
+
|
3
|
+
TODO: Write a gem description
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'fluent-plugin-redoop'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install fluent-plugin-redoop
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
TODO: Write usage instructions here
|
22
|
+
|
23
|
+
## Contributing
|
24
|
+
|
25
|
+
1. Fork it
|
26
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
29
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
|
5
|
+
Gem::Specification.new do |gem|
|
6
|
+
gem.name = "fluent-plugin-redoop"
|
7
|
+
gem.version = "0.0.2"
|
8
|
+
gem.authors = ["Aaron Lunsford"]
|
9
|
+
gem.email = ["awlunsfo@gmail.com"]
|
10
|
+
gem.description = %q{Redoop plugin for Fluentd. Publishes data to redis and redis pubsub}
|
11
|
+
gem.summary = %q{see description}
|
12
|
+
gem.homepage = "https://github.com/awlunsfo/fluent-plugin-redoop"
|
13
|
+
gem.licenses = "Anyone can use this for whatever, I don't care."
|
14
|
+
|
15
|
+
gem.files = `git ls-files`.split($/)
|
16
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
17
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
|
+
gem.require_paths = ["lib"]
|
19
|
+
|
20
|
+
gem.add_runtime_dependency "rest-client"
|
21
|
+
gem.add_runtime_dependency "json"
|
22
|
+
gem.add_runtime_dependency "redis"
|
23
|
+
gem.add_runtime_dependency "fluentd"
|
24
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require 'redis'
|
2
|
+
require 'json'
|
3
|
+
|
4
|
+
module Fluent
|
5
|
+
class RedoopOutput < Output
|
6
|
+
Fluent::Plugin.register_output('redoop', self)
|
7
|
+
|
8
|
+
# This method is called before starting.
|
9
|
+
def configure(conf)
|
10
|
+
super
|
11
|
+
|
12
|
+
@redis = Redis.new(:host => "127.0.0.1", :port => 6379)
|
13
|
+
|
14
|
+
params = {}
|
15
|
+
params["key_1"] = conf["key_1"]
|
16
|
+
params["key_2"] = conf["key_2"]
|
17
|
+
|
18
|
+
puts "*********"
|
19
|
+
puts params
|
20
|
+
puts "*********"
|
21
|
+
end
|
22
|
+
|
23
|
+
# This method is called when starting.
|
24
|
+
def start
|
25
|
+
super
|
26
|
+
end
|
27
|
+
|
28
|
+
# This method is called when shutting down.
|
29
|
+
def shutdown
|
30
|
+
super
|
31
|
+
end
|
32
|
+
|
33
|
+
# This method is called when an event reaches Fluentd.
|
34
|
+
# 'es' is a Fluent::EventStream object that includes multiple events.
|
35
|
+
# You can use 'es.each {|time,record| ... }' to retrieve events.
|
36
|
+
# 'chain' is an object that manages transactions. Call 'chain.next' at
|
37
|
+
# appropriate points and rollback if it raises an exception.
|
38
|
+
def emit(tag, es, chain)
|
39
|
+
chain.next
|
40
|
+
es.each {|time,record|
|
41
|
+
score = Time.now.to_i
|
42
|
+
@redis.zadd tag, score, record.to_json
|
43
|
+
@redis.publish "mathematica", record.to_json
|
44
|
+
# puts record
|
45
|
+
$stderr.puts "OK!"
|
46
|
+
}
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
metadata
ADDED
@@ -0,0 +1,108 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: fluent-plugin-redoop
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Aaron Lunsford
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-08-23 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rest-client
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ! '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ! '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: json
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ! '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: redis
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: fluentd
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ! '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description: Redoop plugin for Fluentd. Publishes data to redis and redis pubsub
|
70
|
+
email:
|
71
|
+
- awlunsfo@gmail.com
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- .gitignore
|
77
|
+
- .rvmrc
|
78
|
+
- Gemfile
|
79
|
+
- LICENSE.txt
|
80
|
+
- README.md
|
81
|
+
- Rakefile
|
82
|
+
- fluent-plugin-redoop.gemspec
|
83
|
+
- lib/fluent/plugin/out_redoop.rb
|
84
|
+
homepage: https://github.com/awlunsfo/fluent-plugin-redoop
|
85
|
+
licenses:
|
86
|
+
- Anyone can use this for whatever, I don't care.
|
87
|
+
metadata: {}
|
88
|
+
post_install_message:
|
89
|
+
rdoc_options: []
|
90
|
+
require_paths:
|
91
|
+
- lib
|
92
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ! '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
requirements: []
|
103
|
+
rubyforge_project:
|
104
|
+
rubygems_version: 2.0.7
|
105
|
+
signing_key:
|
106
|
+
specification_version: 4
|
107
|
+
summary: see description
|
108
|
+
test_files: []
|