logstash-filter-influxdb 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: a41a0244b6a04aba95c1ccc6669ef05b2dbab20e373da1a864ced7c8c329bfea
4
+ data.tar.gz: 24207042d460ed53bbe3ee166e4aa94d95ef957f6cf69a0d4173099aaed3aac6
5
+ SHA512:
6
+ metadata.gz: 328301f11cb6f283278ca0d332b3bd6bfc7168d7277a05ceca3c0786c455fca28038891099a252513827b790d0d53da588a23a95bbebed18fcac98311d777b7b
7
+ data.tar.gz: 21588070f7edf7bc5ec47a72370762e239a0edb5a98ddd7e175f7a1580e1923a4d5ba2839ec3020c55487bbb77af8a4401999244a0535177c0c46e24427f90b8
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+ gemspec
3
+ gem "logstash", :github => "elastic/logstash", :branch => "6.8"
@@ -0,0 +1,46 @@
1
+ # encoding: utf-8
2
+ require "logstash/filters/base"
3
+ require "logstash/namespace"
4
+ require "influxparser"
5
+
6
+ # Add any asciidoc formatted documentation here
7
+ # This example filter will replace the contents of the default
8
+ # message field with whatever you specify in the configuration.
9
+ #
10
+ # It is only intended to be used as an example.
11
+ class LogStash::Filters::Influxdb < LogStash::Filters::Base
12
+
13
+ # Setting the config_name here is required. This is how you
14
+ # configure this filter from your Logstash config.
15
+ #
16
+ # filter {
17
+ # example { message => "My message..." }
18
+ # }
19
+ config_name "influxdb"
20
+
21
+ # Replace the message with this value.
22
+ config :message, :validate => :string, :default => "Hello World!"
23
+
24
+
25
+ public
26
+ def register
27
+ # Add instance variables
28
+ end # def register
29
+
30
+ public
31
+ def filter(event)
32
+ point = InfluxParser.parse_point(event.get('message'))
33
+ event.set('point', point)
34
+ # event.set("point")
35
+ # if @message
36
+ # # Replace the event message with our message as configured in the
37
+ # # config file.
38
+ # # event.set("message", @message)
39
+
40
+ # end
41
+
42
+ # filter_matched should go in the last line of our successful code
43
+ filter_matched(event)
44
+ end # def filter
45
+
46
+ end # class LogStash::Filters::Influxdb
@@ -0,0 +1,24 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = 'logstash-filter-influxdb'
3
+ s.version = '0.0.1'
4
+ s.licenses = ['Apache License (2.0)']
5
+ s.summary = "Parse a string of influx line protocol to fields"
6
+ s.description = "This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
7
+ s.authors = ["Robert Labrie"]
8
+ s.email = 'robert.labrie@gmail.com'
9
+ # s.homepage = "http://www.elastic.co/guide/en/logstash/current/index.html"
10
+ s.require_paths = ["lib"]
11
+
12
+ # Files
13
+ s.files = Dir['lib/**/*','spec/**/*','vendor/**/*','*.gemspec','*.md','CONTRIBUTORS','Gemfile','LICENSE','NOTICE.TXT']
14
+ # Tests
15
+ s.test_files = s.files.grep(%r{^(test|spec|features)/})
16
+
17
+ # Special flag to let us know this is actually a logstash plugin
18
+ s.metadata = { "logstash_plugin" => "true", "logstash_group" => "filter" }
19
+
20
+ # Gem dependencies
21
+ s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99"
22
+ s.add_runtime_dependency "influxparser", ">=0.0.1"
23
+ s.add_development_dependency 'logstash-devutils'
24
+ end
metadata ADDED
@@ -0,0 +1,97 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: logstash-filter-influxdb
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Robert Labrie
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-01-30 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: logstash-core-plugin-api
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '1.60'
20
+ - - "<="
21
+ - !ruby/object:Gem::Version
22
+ version: '2.99'
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '1.60'
30
+ - - "<="
31
+ - !ruby/object:Gem::Version
32
+ version: '2.99'
33
+ - !ruby/object:Gem::Dependency
34
+ name: influxparser
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: 0.0.1
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: 0.0.1
47
+ - !ruby/object:Gem::Dependency
48
+ name: logstash-devutils
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
61
+ description: This gem is a logstash plugin required to be installed on top of the
62
+ Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This
63
+ gem is not a stand-alone program
64
+ email: robert.labrie@gmail.com
65
+ executables: []
66
+ extensions: []
67
+ extra_rdoc_files: []
68
+ files:
69
+ - Gemfile
70
+ - lib/logstash/filters/influxdb.rb
71
+ - logstash-filter-influxdb.gemspec
72
+ homepage:
73
+ licenses:
74
+ - Apache License (2.0)
75
+ metadata:
76
+ logstash_plugin: 'true'
77
+ logstash_group: filter
78
+ post_install_message:
79
+ rdoc_options: []
80
+ require_paths:
81
+ - lib
82
+ required_ruby_version: !ruby/object:Gem::Requirement
83
+ requirements:
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ version: '0'
87
+ required_rubygems_version: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
92
+ requirements: []
93
+ rubygems_version: 3.0.6
94
+ signing_key:
95
+ specification_version: 4
96
+ summary: Parse a string of influx line protocol to fields
97
+ test_files: []