logstash-output-logmatic 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0b87d20d8589bd5bd02e2ffd533e21555db26bbe
4
- data.tar.gz: e18fbc95f1e283052bca1a7f73141eb41f589489
3
+ metadata.gz: 1f4c336a1aa8c1c96d35e9dfb0527bb3be5bbb1a
4
+ data.tar.gz: 6c7963ab72043cda85de06d3ea34d8b2fa22b44d
5
5
  SHA512:
6
- metadata.gz: 4213878f8e592aca8884e23d6f9358251cb6f96d9bf50cc6b59fd76264f645d4f98be46a1be38e39c0ca7328af7a850d60088e477705d8a7fe9c0d4c3fb77b03
7
- data.tar.gz: ddeca254ef9835b9280138d43aaa30a5b24fa2eaf8071fd567e4e431bf28c0190408d9261f0c78bf6128e8d896605bc01107712620191a0fd097781979a78c31
6
+ metadata.gz: 388b0d88dfd686fc2c1f98887f863e31cb5e52831f5c45962f8e3db043abbd38ee660da1e0f963392a659336f203fea39defb62a88ab8cbb0098d6313b8c56e9
7
+ data.tar.gz: b0168749fd2c202341e3c313da94da9e73420c4e55bef81a3d6d7375dc1ea64c603d39d6b9b09eab575fc69cdaaacfd253b8984ffc6b9fa5fa36c518ded7aa83
data/README.md CHANGED
@@ -9,9 +9,9 @@ To install it in your Logstash install:
9
9
 
10
10
  - Edit Logstash `Gemfile` and add the local plugin path, for example:
11
11
 
12
- ```
13
- gem "logstash-output-logmatic"
14
- ```
12
+ ```
13
+ gem "logstash-output-logmatic"
14
+ ```
15
15
 
16
16
  - Then install plugin:
17
17
 
@@ -4,7 +4,7 @@ require "logstash/namespace"
4
4
  require "stud/buffer"
5
5
 
6
6
  # Ship log from logstash straight to Logmatic
7
- #
7
+ #
8
8
  # To use this you will need a valid Logmatic API Key
9
9
  class LogStash::Outputs::LogmaticBatch < LogStash::Outputs::Base
10
10
  include Stud::Buffer
@@ -12,6 +12,8 @@ class LogStash::Outputs::LogmaticBatch < LogStash::Outputs::Base
12
12
  config_name "logmatic"
13
13
  milestone 2
14
14
 
15
+ default :codec, "json"
16
+
15
17
  # The Logmatic api key
16
18
  # You can find it in the 'Account' section in the Logmatic interface.
17
19
  config :key, :validate => :string, :required => true
@@ -44,14 +46,14 @@ class LogStash::Outputs::LogmaticBatch < LogStash::Outputs::Base
44
46
  public
45
47
  def receive(event)
46
48
  return unless output?(event)
47
- buffer_receive(event)
49
+ buffer_receive(event.to_json)
48
50
  end
49
51
 
50
52
  public
51
53
  def flush(events, final=false)
52
54
  # Send the event over http.
53
55
  request = Net::HTTP::Post.new(@uri.path)
54
- request.body = events.to_json
56
+ request.body = events.inspect
55
57
  request.add_field("Content-Type", 'application/json')
56
58
  response = @client.request(request)
57
59
  if response.is_a?(Net::HTTPSuccess)
@@ -60,4 +62,4 @@ class LogStash::Outputs::LogmaticBatch < LogStash::Outputs::Base
60
62
  @logger.warn("HTTP error", :error => response.error!)
61
63
  end
62
64
  end # def receive
63
- end # class LogStash::Outputs::LogmaticBatch
65
+ end # class LogStash::Outputs::LogmaticBatch
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-output-logmatic'
3
- s.version = "0.1.0"
3
+ s.version = "0.1.1"
4
4
  s.licenses = ["GNU 2.0"]
5
5
  s.summary = "Logmatic Output"
6
6
  s.description = "Logmatic output for Logstash"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-logmatic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Giovanni CLEMENT