fluent-plugin-splunk 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +27 -0
- data/fluent-plugin-splunk.gemspec +19 -0
- data/lib/fluent/plugin/out_splunk.rb +29 -0
- metadata +77 -0
data/README.rdoc
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
= Splunk output plugin for Fluent event collector
|
2
|
+
|
3
|
+
== Overview
|
4
|
+
|
5
|
+
*This plugin allows you to stream logs from fluentd event collector to your splunk installation (or splunkstorm.com)*
|
6
|
+
|
7
|
+
== Installation
|
8
|
+
|
9
|
+
gem install fluent-plugin-splunk
|
10
|
+
|
11
|
+
== Configuration
|
12
|
+
|
13
|
+
<match pattern>
|
14
|
+
type splunk
|
15
|
+
host <splunk_host>
|
16
|
+
port <splunk_port>
|
17
|
+
</match>
|
18
|
+
|
19
|
+
|
20
|
+
== Copyright
|
21
|
+
|
22
|
+
Copyright:: Copyright (c) 2011 Abhishek Parolkar
|
23
|
+
License:: Apache License, Version 2.0
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
Gem::Specification.new do |gem|
|
4
|
+
gem.name = "fluent-plugin-splunk"
|
5
|
+
gem.description = "Splunk output plugin for Fluent event collector"
|
6
|
+
gem.homepage = "https://github.com/parolkar/fluent-plugin-splunk"
|
7
|
+
gem.summary = gem.description
|
8
|
+
gem.version = "0.0.1"
|
9
|
+
gem.authors = ["Abhishek Parolkar"]
|
10
|
+
gem.email = "abhishek@parolkar.com"
|
11
|
+
gem.has_rdoc = false
|
12
|
+
gem.files = `git ls-files`.split("\n")
|
13
|
+
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
14
|
+
gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
15
|
+
gem.require_paths = ['lib']
|
16
|
+
gem.add_dependency "fluentd", "~> 0.10.7"
|
17
|
+
end
|
18
|
+
|
19
|
+
|
@@ -0,0 +1,29 @@
|
|
1
|
+
class SplunkOutput < Fluent::Output
|
2
|
+
Fluent::Plugin.register_output('splunk', self)
|
3
|
+
|
4
|
+
config_param :host, :string
|
5
|
+
config_param :port, :string
|
6
|
+
|
7
|
+
def configure(conf)
|
8
|
+
super
|
9
|
+
end
|
10
|
+
|
11
|
+
def start
|
12
|
+
super
|
13
|
+
puts @host
|
14
|
+
puts @port
|
15
|
+
@splunk_connection = TCPSocket.open(@host, @port)
|
16
|
+
end
|
17
|
+
|
18
|
+
def shutdown
|
19
|
+
super
|
20
|
+
@splunk_connection.close
|
21
|
+
end
|
22
|
+
|
23
|
+
def emit(tag, es, chain)
|
24
|
+
chain.next
|
25
|
+
es.each {|time,record|
|
26
|
+
@splunk_connection.puts "#{time}: #{record}\n"
|
27
|
+
}
|
28
|
+
end
|
29
|
+
end
|
metadata
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: fluent-plugin-splunk
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 0
|
8
|
+
- 1
|
9
|
+
version: 0.0.1
|
10
|
+
platform: ruby
|
11
|
+
authors:
|
12
|
+
- Abhishek Parolkar
|
13
|
+
autorequire:
|
14
|
+
bindir: bin
|
15
|
+
cert_chain: []
|
16
|
+
|
17
|
+
date: 2011-12-03 00:00:00 +08:00
|
18
|
+
default_executable:
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: fluentd
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ~>
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 0
|
29
|
+
- 10
|
30
|
+
- 7
|
31
|
+
version: 0.10.7
|
32
|
+
type: :runtime
|
33
|
+
version_requirements: *id001
|
34
|
+
description: Splunk output plugin for Fluent event collector
|
35
|
+
email: abhishek@parolkar.com
|
36
|
+
executables: []
|
37
|
+
|
38
|
+
extensions: []
|
39
|
+
|
40
|
+
extra_rdoc_files: []
|
41
|
+
|
42
|
+
files:
|
43
|
+
- README.rdoc
|
44
|
+
- fluent-plugin-splunk.gemspec
|
45
|
+
- lib/fluent/plugin/out_splunk.rb
|
46
|
+
has_rdoc: true
|
47
|
+
homepage: https://github.com/parolkar/fluent-plugin-splunk
|
48
|
+
licenses: []
|
49
|
+
|
50
|
+
post_install_message:
|
51
|
+
rdoc_options: []
|
52
|
+
|
53
|
+
require_paths:
|
54
|
+
- lib
|
55
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - ">="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
segments:
|
60
|
+
- 0
|
61
|
+
version: "0"
|
62
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
63
|
+
requirements:
|
64
|
+
- - ">="
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
segments:
|
67
|
+
- 0
|
68
|
+
version: "0"
|
69
|
+
requirements: []
|
70
|
+
|
71
|
+
rubyforge_project:
|
72
|
+
rubygems_version: 1.3.6
|
73
|
+
signing_key:
|
74
|
+
specification_version: 3
|
75
|
+
summary: Splunk output plugin for Fluent event collector
|
76
|
+
test_files: []
|
77
|
+
|