logstash-filter-mixpanel 0.1.0
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 +15 -0
- data/.coveralls.yml +1 -0
- data/.gitignore +7 -0
- data/.travis.yml +17 -0
- data/CONTRIBUTORS +11 -0
- data/DEVELOPER.md +2 -0
- data/Gemfile +3 -0
- data/LICENSE +13 -0
- data/README.md +26 -0
- data/Rakefile +1 -0
- data/lib/logstash/filters/mixpanel.rb +43 -0
- data/logstash-filter-mixpanel.gemspec +25 -0
- data/spec/filters/mixpanel_spec.rb +20 -0
- data/spec/spec_helper.rb +3 -0
- metadata +111 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
!binary "U0hBMQ==":
|
|
3
|
+
metadata.gz: !binary |-
|
|
4
|
+
ZWM4MmFhYmZjMGE4NDFkZGI2YWQ0MDg0ODI1NDMwMzY1ZGQ2NzkyMQ==
|
|
5
|
+
data.tar.gz: !binary |-
|
|
6
|
+
MDYyOGFlYTZkZGQ0MDNmZDdiYmRkOThjMTNjNzYzMWQ5N2Q1M2MyNw==
|
|
7
|
+
SHA512:
|
|
8
|
+
metadata.gz: !binary |-
|
|
9
|
+
Nzk5MzZhYTcyYTRjNTlkMGUzNThiMTUzZmM5OGFmMGEzMGZiNGE5YjMzZmUz
|
|
10
|
+
MTE3NDk3OWZkNjhmZjc0NDQzNzMxMTYxZWExYmJhMjI4YjhiMzEwMjJlMDdj
|
|
11
|
+
NmQyNzFjMjk1MzRhMDFiMDU4YjdiNTcxYmVjMTNiNWE3NjE4OTA=
|
|
12
|
+
data.tar.gz: !binary |-
|
|
13
|
+
ZjFlNDUwOWJkM2M4ODgyZmU4MTEwNmNjNDA3YWZjNzcyNTAyMmE3ODk1MzNm
|
|
14
|
+
MGQxZmQ3MzRmYzNlYTkxMzEzYjM2NzAyYzI5OTFjODdkNzBmNmRlOTA5ZWU0
|
|
15
|
+
ZTdjNGYyOTY2YmM1YWRhZjJmODczOWE0MDhlOTBhOGNlYWJkMTg=
|
data/.coveralls.yml
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
service_name: travis-ci
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
language: ruby
|
|
2
|
+
rvm:
|
|
3
|
+
- jruby-1.7.20
|
|
4
|
+
before_install:
|
|
5
|
+
- gem install bundler -v 1.10.1
|
|
6
|
+
script: bundle exec rspec
|
|
7
|
+
deploy:
|
|
8
|
+
provider: rubygems
|
|
9
|
+
api_key:
|
|
10
|
+
secure: ZFdsmBGEC8M+ptjhs3VQWf1n+ov5sZfMMGqQctcppZtHnrlrGYd6lwt/NxeyfqsXEklK+h/ykTP+2aCTul0DdjbPfxSYNcnOrDnealX08WRumbVpAdsfCkeLcpvTNr9MHv0DT74LA1DR1oCBspy46jelf75T7+PZLk2/XrmaHOT5nIKRHx61Ic6cU7YFJSM/sJm/C6Y3hfEqBzj1tH5EBZ4YLxCRScR2ExJDdXeShPjhVgdse+2mLzVSPvorvcztUd9KzfM8W5RzMFB3MJFBZRhAqAQgmiI7ceyss0KE5IUgwg5sgETvMby7WQ/DdMrRJpSSK5rG8cN38MQOlsz2S4QiLG9Sd6tKV3KOuiuy08b6EwrqStKXDYVDS73STAnHIpoAFsWqGRQhFNqXK64A729uthzRQTpESNzl8pjD12zfzfqfHn1BzD2X/ywzwcaOPzYGF2B7/5/TbgAFd39XxXd01AWFFlBqyzkSuPQjU7mlWmcbGF+Y/2UDmpkR6hfaXGQdg2Z87vFF6+Wmjk7lzCzaQeWmECgP+Pw3NYz9JMAPnYNiYWeVYQWZidUHaWWUTaFrEc6QpwQNO9xQajcmxJEOEk6vTkyfFZGmWneMd7nxYZ7vOn0PkerbjLkWHsKAztY8VUR6erUOG1lPxyNA2KjZ7bxa4LS1A2Yj5MGW32c=
|
|
11
|
+
after_success:
|
|
12
|
+
- coveralls
|
|
13
|
+
addons:
|
|
14
|
+
code_climate:
|
|
15
|
+
repo_token:
|
|
16
|
+
secure: bHBQO01SKDgd+FB8hfwoGsPnXL+a6orf3rzXmcF8E71WRDGXgj/Qu+U3kyRR0AIFAXhBz2+RrMnBRmqiRpinWWpxFyA9RmSjRMHP5fAKukHZu9u1AyY+3M+/cR5AEwiGxvd6rzaYffw9Qn5WSTqkAmz8PrMLwkBn4Wc90nX6WAaasx4p28IIalqHo8ETWMbs7Tb1442bsDUrUzC3dA4NTcil5Z5uLvtX75fJe0k/tgp7XuUkGbUg+v+cFbjdVsTu8ZEp6gpChmBD91OxW5t9n+nVeXR8wyZp0TxbP47Tn7BMU3qAv08fc+SuqJE0XFm1eI9Z9Fu4WrWMS5IIvcXeFqIl3rHRD84T2UIeLaLvjDjYmwvhGYIZ5LO9SzKA/qefOXp/drvvDX98GDnlCrFAXiKyHmZPHWp9zJU+RXjhTT1HmvOgHbi+xglqjFEdSuR2XjxGxoDukTEVSb7gUKOhmvNWA12YJRv+HEM4dYYVYDQrnrWz37QRaS/aLERuL4d+Y+0gRTPi3FRjnBGeEYBVLNHRSB3SvjOUWsCobTFNhRN32w1Pkdk9DrPXfG9hD4jcOhL6G2Q/URkR3TAAhEuXjkmXrxt6CqQoOFM/yGpTQ4BNBfTis9WGzsAFGowVYVUoEJsaRcgzuFcbqv2W+bAc4j4JSsRPw6pf7mItjlRwClY=
|
|
17
|
+
cache: bundler
|
data/CONTRIBUTORS
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
The following is a list of people who have contributed ideas, code, bug
|
|
2
|
+
reports, or in general have helped logstash along its way.
|
|
3
|
+
|
|
4
|
+
Contributors:
|
|
5
|
+
* Aaron Mildenstein (untergeek)
|
|
6
|
+
* Pier-Hugues Pellerin (ph)
|
|
7
|
+
|
|
8
|
+
Note: If you've sent us patches, bug reports, or otherwise contributed to
|
|
9
|
+
Logstash, and you aren't on the list above and want to be, please let us know
|
|
10
|
+
and we'll make sure you're here. Contributions from folks like you are what make
|
|
11
|
+
open source awesome.
|
data/DEVELOPER.md
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Copyright (c) 2012–2015 Elasticsearch <http://www.elastic.co>
|
|
2
|
+
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License.
|
|
5
|
+
You may obtain a copy of the License at
|
|
6
|
+
|
|
7
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
|
|
9
|
+
Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
See the License for the specific language governing permissions and
|
|
13
|
+
limitations under the License.
|
data/README.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Logstash Plugin
|
|
2
|
+
|
|
3
|
+
This is a plugin for [Logstash](https://github.com/elasticsearch/logstash).
|
|
4
|
+
|
|
5
|
+
It is fully free and fully open source. The license is Apache 2.0, meaning you are pretty much free to use it however you want in whatever way.
|
|
6
|
+
|
|
7
|
+
# Status
|
|
8
|
+
- [](http://badge.fury.io/rb/logstash-filter-mixpanel)
|
|
9
|
+
- [](https://travis-ci.org/torstenfeld/logstash-filter-mixpanel) (master)
|
|
10
|
+
- [](https://coveralls.io/r/torstenfeld/logstash-filter-mixpanel?branch=master)
|
|
11
|
+
- [](https://codeclimate.com/github/torstenfeld/logstash-filter-mixpanel)
|
|
12
|
+
- [](https://gemnasium.com/torstenfeld/logstash-filter-mixpanel)
|
|
13
|
+
|
|
14
|
+
# Installation
|
|
15
|
+
|
|
16
|
+
- Edit Logstash `Gemfile` and add needed requirements:
|
|
17
|
+
```ruby
|
|
18
|
+
gem "whatlanguage"
|
|
19
|
+
gem "logstash-filter-mixpanel", ">= 0.2.0", :git => "https://github.com/torstenfeld/logstash-filter-mixpanel.git"
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
- Install and update dependencies
|
|
24
|
+
```sh
|
|
25
|
+
bundle install
|
|
26
|
+
```
|
data/Rakefile
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require "logstash/devutils/rake"
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
require "logstash/filters/base"
|
|
3
|
+
require "logstash/namespace"
|
|
4
|
+
|
|
5
|
+
# This example filter will replace the contents of the default
|
|
6
|
+
# message field with whatever you specify in the configuration.
|
|
7
|
+
#
|
|
8
|
+
# It is only intended to be used as an example.
|
|
9
|
+
class LogStash::Filters::Example < LogStash::Filters::Base
|
|
10
|
+
|
|
11
|
+
# Setting the config_name here is required. This is how you
|
|
12
|
+
# configure this filter from your Logstash config.
|
|
13
|
+
#
|
|
14
|
+
# filter {
|
|
15
|
+
# example {
|
|
16
|
+
# message => "My message..."
|
|
17
|
+
# }
|
|
18
|
+
# }
|
|
19
|
+
#
|
|
20
|
+
config_name "example"
|
|
21
|
+
|
|
22
|
+
# Replace the message with this value.
|
|
23
|
+
config :message, :validate => :string, :default => "Hello World!"
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
public
|
|
27
|
+
def register
|
|
28
|
+
# Add instance variables
|
|
29
|
+
end # def register
|
|
30
|
+
|
|
31
|
+
public
|
|
32
|
+
def filter(event)
|
|
33
|
+
|
|
34
|
+
if @message
|
|
35
|
+
# Replace the event message with our message as configured in the
|
|
36
|
+
# config file.
|
|
37
|
+
event["message"] = @message
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# filter_matched should go in the last line of our successful code
|
|
41
|
+
filter_matched(event)
|
|
42
|
+
end # def filter
|
|
43
|
+
end # class LogStash::Filters::Example
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
Gem::Specification.new do |s|
|
|
2
|
+
s.name = 'logstash-filter-mixpanel'
|
|
3
|
+
s.version = '0.1.0'
|
|
4
|
+
s.version = "#{s.version}.pre.#{ENV['TRAVIS_BUILD_NUMBER']}" if ENV['TRAVIS'] and ENV['TRAVIS_BRANCH'] != 'master'
|
|
5
|
+
s.licenses = ['Apache License (2.0)']
|
|
6
|
+
s.summary = "This filter checks mixpanel for additional people data and adds it to the event data"
|
|
7
|
+
s.description = "This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone program"
|
|
8
|
+
s.authors = ["Torsten Feld"]
|
|
9
|
+
s.email = 'logstash@torsten-feld.de'
|
|
10
|
+
s.homepage = "https://github.com/torstenfeld/logstash-filter-mixpanel"
|
|
11
|
+
s.require_paths = ["lib"]
|
|
12
|
+
|
|
13
|
+
# Files
|
|
14
|
+
s.files = `git ls-files`.split($\)
|
|
15
|
+
# Tests
|
|
16
|
+
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
|
17
|
+
|
|
18
|
+
# Special flag to let us know this is actually a logstash plugin
|
|
19
|
+
s.metadata = { "logstash_plugin" => "true", "logstash_group" => "filter" }
|
|
20
|
+
|
|
21
|
+
# Gem dependencies
|
|
22
|
+
s.add_runtime_dependency "logstash-core", '>= 1.4.0', '< 2.0.0'
|
|
23
|
+
s.add_development_dependency 'logstash-devutils'
|
|
24
|
+
s.add_development_dependency 'coveralls', '~> 0.8.1'
|
|
25
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
require File.absolute_path(File.join(File.dirname(__FILE__), '../../spec/spec_helper'))
|
|
2
|
+
require File.absolute_path(File.join(File.dirname(__FILE__), '../../lib/logstash/filters/mixpanel'))
|
|
3
|
+
|
|
4
|
+
describe LogStash::Filters::Example do
|
|
5
|
+
describe "Set to Hello World" do
|
|
6
|
+
let(:config) do <<-CONFIG
|
|
7
|
+
filter {
|
|
8
|
+
example {
|
|
9
|
+
message => "Hello World"
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
CONFIG
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
sample("message" => "some text") do
|
|
16
|
+
expect(subject).to include("message")
|
|
17
|
+
expect(subject['message']).to eq('Hello World')
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: logstash-filter-mixpanel
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Torsten Feld
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2015-06-06 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: logstash-core
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - ! '>='
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: 1.4.0
|
|
20
|
+
- - <
|
|
21
|
+
- !ruby/object:Gem::Version
|
|
22
|
+
version: 2.0.0
|
|
23
|
+
type: :runtime
|
|
24
|
+
prerelease: false
|
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
26
|
+
requirements:
|
|
27
|
+
- - ! '>='
|
|
28
|
+
- !ruby/object:Gem::Version
|
|
29
|
+
version: 1.4.0
|
|
30
|
+
- - <
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: 2.0.0
|
|
33
|
+
- !ruby/object:Gem::Dependency
|
|
34
|
+
name: logstash-devutils
|
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
|
36
|
+
requirements:
|
|
37
|
+
- - ! '>='
|
|
38
|
+
- !ruby/object:Gem::Version
|
|
39
|
+
version: '0'
|
|
40
|
+
type: :development
|
|
41
|
+
prerelease: false
|
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
43
|
+
requirements:
|
|
44
|
+
- - ! '>='
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: '0'
|
|
47
|
+
- !ruby/object:Gem::Dependency
|
|
48
|
+
name: coveralls
|
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
|
50
|
+
requirements:
|
|
51
|
+
- - ~>
|
|
52
|
+
- !ruby/object:Gem::Version
|
|
53
|
+
version: 0.8.1
|
|
54
|
+
type: :development
|
|
55
|
+
prerelease: false
|
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
57
|
+
requirements:
|
|
58
|
+
- - ~>
|
|
59
|
+
- !ruby/object:Gem::Version
|
|
60
|
+
version: 0.8.1
|
|
61
|
+
description: This gem is a logstash plugin required to be installed on top of the
|
|
62
|
+
Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not
|
|
63
|
+
a stand-alone program
|
|
64
|
+
email: logstash@torsten-feld.de
|
|
65
|
+
executables: []
|
|
66
|
+
extensions: []
|
|
67
|
+
extra_rdoc_files: []
|
|
68
|
+
files:
|
|
69
|
+
- .coveralls.yml
|
|
70
|
+
- .gitignore
|
|
71
|
+
- .travis.yml
|
|
72
|
+
- CONTRIBUTORS
|
|
73
|
+
- DEVELOPER.md
|
|
74
|
+
- Gemfile
|
|
75
|
+
- LICENSE
|
|
76
|
+
- README.md
|
|
77
|
+
- Rakefile
|
|
78
|
+
- lib/logstash/filters/mixpanel.rb
|
|
79
|
+
- logstash-filter-mixpanel.gemspec
|
|
80
|
+
- spec/filters/mixpanel_spec.rb
|
|
81
|
+
- spec/spec_helper.rb
|
|
82
|
+
homepage: https://github.com/torstenfeld/logstash-filter-mixpanel
|
|
83
|
+
licenses:
|
|
84
|
+
- Apache License (2.0)
|
|
85
|
+
metadata:
|
|
86
|
+
logstash_plugin: 'true'
|
|
87
|
+
logstash_group: filter
|
|
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.4.5
|
|
105
|
+
signing_key:
|
|
106
|
+
specification_version: 4
|
|
107
|
+
summary: This filter checks mixpanel for additional people data and adds it to the
|
|
108
|
+
event data
|
|
109
|
+
test_files:
|
|
110
|
+
- spec/filters/mixpanel_spec.rb
|
|
111
|
+
- spec/spec_helper.rb
|