fluent-plugin-statsd-event 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.txt +24 -0
- data/README.md +50 -0
- data/Rakefile +15 -0
- data/fluent-plugin-statsd-event.gemspec +25 -0
- data/lib/fluent/plugin/filter_statsd_event.rb +2 -2
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9015c001759f96df3acbabfc5dd293106bfa5ac4
|
4
|
+
data.tar.gz: c8ef9a513b10f88756c9b59f9f841ef8ac45b35a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c54f202851cf8c6b092e1c10e12a6809b5832c71ca328f316090d3b3081c3d05a11d90df1a08864646b4b1d49149b38727696c02e3da593b8e007ced1bff263
|
7
|
+
data.tar.gz: d756319dd42377a75d4c333a4c0a98d301e78e02880b20c987207d80d2a8d539beb33c8d3546dd05a8b0cd849b1994fd57fb2abef4061b1cd1317038c25d55bd
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2016 Atlassian
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person
|
6
|
+
obtaining a copy of this software and associated documentation
|
7
|
+
files (the "Software"), to deal in the Software without
|
8
|
+
restriction, including without limitation the rights to use,
|
9
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
+
copies of the Software, and to permit persons to whom the
|
11
|
+
Software is furnished to do so, subject to the following
|
12
|
+
conditions:
|
13
|
+
|
14
|
+
The above copyright notice and this permission notice shall be
|
15
|
+
included in all copies or substantial portions of the Software.
|
16
|
+
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
18
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
19
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
20
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
21
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
22
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
23
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
24
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
# fluent-plugin-statsd_event, a plugin for [Fluentd](http://fluentd.org)
|
2
|
+
|
3
|
+
## Installation
|
4
|
+
|
5
|
+
gem install fluent-plugin-statsd_event
|
6
|
+
|
7
|
+
## Configuration
|
8
|
+
|
9
|
+
* `host` - Statsd host. String, default: '127.0.0.1'
|
10
|
+
* `port` - Statsd port. String, default: '8125'
|
11
|
+
* `grep` - If set only matched lines will be sent to statsd. Array, default: none
|
12
|
+
* `tags` - Tags to be added to every message. Array, default: none
|
13
|
+
* `record_key` - Key for fluentd log record. Usually it's value set to 'message'. If not set, whole fluentd record will be sent as JSON. String, default: none
|
14
|
+
* `alert_type` - Datadog statsd alert type. Can be "error", "warning", "info" or "success". String, default: none
|
15
|
+
* `priority` - Datadog statsd priority. Can be "normal" or "low". String, default: none
|
16
|
+
* `aggregation_key` - Datadog statsd aggregation key. Assign an aggregation key to the event, to group it with some others. String, default: none
|
17
|
+
* `source_type_name` - Datadog statsd source type name. An array of tags. Array, default: none
|
18
|
+
|
19
|
+
### The simplest configuration
|
20
|
+
Stream kernel messages to local datadog-statsd instance
|
21
|
+
```
|
22
|
+
<filter syslog.kernel>
|
23
|
+
type statsd_event
|
24
|
+
</filter>
|
25
|
+
```
|
26
|
+
|
27
|
+
### A bit more sophisticated example
|
28
|
+
Stream all error messages from syslog to a remote statsd instance
|
29
|
+
```
|
30
|
+
<filter syslog.**>
|
31
|
+
host statsd.example.com
|
32
|
+
port 8125
|
33
|
+
type statsd_event
|
34
|
+
grep ["ERROR", "err[^\w]"]
|
35
|
+
tags ["alert:syslog", "role:controller"]
|
36
|
+
alert_type error
|
37
|
+
record_key message
|
38
|
+
</filter>
|
39
|
+
```
|
40
|
+
## Contributing
|
41
|
+
|
42
|
+
1. Fork it
|
43
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
44
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
45
|
+
4. Test it (`GEM_HOME=vendor bundle install; GEM_HOME=vendor bundle exec rake test`)
|
46
|
+
5. Push to the branch (`git push origin my-new-feature`)
|
47
|
+
6. Create new Pull Request
|
48
|
+
|
49
|
+
## Copyright
|
50
|
+
Copyright (c) 2016 Atlassian
|
data/Rakefile
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
require "bundler/gem_tasks"
|
3
|
+
|
4
|
+
require 'rake/testtask'
|
5
|
+
|
6
|
+
desc 'Run test_unit based test'
|
7
|
+
|
8
|
+
Rake::TestTask.new(:test) do |test|
|
9
|
+
test.libs << 'lib' << 'test'
|
10
|
+
test.pattern = 'test/**/test_*.rb'
|
11
|
+
test.verbose = true
|
12
|
+
end
|
13
|
+
|
14
|
+
task :default => :test
|
15
|
+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# coding: 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 |spec|
|
6
|
+
spec.name = "fluent-plugin-statsd-event"
|
7
|
+
spec.version = "0.1.1"
|
8
|
+
spec.authors = ["Atlassian"]
|
9
|
+
|
10
|
+
spec.summary = %q{fluentd plugin for statsd event}
|
11
|
+
spec.description = %q{fluentd plugin for statsd event}
|
12
|
+
spec.homepage = "https://github.com/atlassian/fluent-plugin-statsd_event"
|
13
|
+
|
14
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|Gemfile|.git)}) }
|
15
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
16
|
+
spec.require_paths = ["lib"]
|
17
|
+
spec.has_rdoc = false
|
18
|
+
|
19
|
+
spec.add_development_dependency "bundler", "~> 1.9"
|
20
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
21
|
+
spec.add_development_dependency "test-unit", "~>3.2.0"
|
22
|
+
spec.add_development_dependency "mocha", "~>1.1.0"
|
23
|
+
spec.add_runtime_dependency "dogstatsd-ruby", "~> 1.6.0"
|
24
|
+
spec.add_runtime_dependency "fluentd", ">= 0.12.0"
|
25
|
+
end
|
@@ -11,7 +11,7 @@ module Fluent
|
|
11
11
|
require 'json'
|
12
12
|
end
|
13
13
|
|
14
|
-
config_param :host, :string, :default => '
|
14
|
+
config_param :host, :string, :default => '127.0.0.1'
|
15
15
|
config_param :port, :string, :default => '8125'
|
16
16
|
config_param :tags, :array, :default => []
|
17
17
|
config_param :grep, :array, :default => []
|
@@ -19,7 +19,7 @@ module Fluent
|
|
19
19
|
config_param :alert_type, :string, :default => nil
|
20
20
|
config_param :priority, :string, :default => nil
|
21
21
|
config_param :aggregation_key, :string, :default => nil
|
22
|
-
config_param :source_type_name, :array, :default =>
|
22
|
+
config_param :source_type_name, :array, :default => nil
|
23
23
|
|
24
24
|
def configure(conf)
|
25
25
|
super
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-statsd-event
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Atlassian
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -100,6 +100,10 @@ executables: []
|
|
100
100
|
extensions: []
|
101
101
|
extra_rdoc_files: []
|
102
102
|
files:
|
103
|
+
- LICENSE.txt
|
104
|
+
- README.md
|
105
|
+
- Rakefile
|
106
|
+
- fluent-plugin-statsd-event.gemspec
|
103
107
|
- lib/fluent/plugin/filter_statsd_event.rb
|
104
108
|
homepage: https://github.com/atlassian/fluent-plugin-statsd_event
|
105
109
|
licenses: []
|