logstash-output-circonus 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +0 -0
- data/NOTICE.TXT +5 -0
- data/README.md +1 -1
- data/lib/logstash/outputs/circonus.rb +8 -7
- data/logstash-output-circonus.gemspec +1 -1
- metadata +14 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8aa19ad156db59495480e1e8ef5f545ae55ea378
|
4
|
+
data.tar.gz: 1ccd79f6fe6278877e24dd93e78785afe567672a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76e14f4f2d88a607e771fa5e7fd6cdafeeb0b449086d4b060d884707392edd65e5784acf250588617f66c1936f18e14269acccc03ed88f43643a4cdbd16856b5
|
7
|
+
data.tar.gz: 6ba2e2872fd0dea8d4869a23162499a80f4d716aad5b3f3597f5b42fc4fc805fc0bd372db3adefd7e57ce0d4d2d66ab075cb685cb48b0063a5c4ca8a483b795f
|
data/CHANGELOG.md
ADDED
File without changes
|
data/NOTICE.TXT
ADDED
data/README.md
CHANGED
@@ -13,7 +13,7 @@ Logstash provides infrastructure to automatically generate documentation for thi
|
|
13
13
|
|
14
14
|
## Need Help?
|
15
15
|
|
16
|
-
Need help? Try #logstash on freenode IRC or the logstash
|
16
|
+
Need help? Try #logstash on freenode IRC or the https://discuss.elastic.co/c/logstash discussion forum.
|
17
17
|
|
18
18
|
## Developing
|
19
19
|
|
@@ -1,12 +1,13 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
require "logstash/outputs/base"
|
3
3
|
require "logstash/namespace"
|
4
|
+
require "logstash/json"
|
4
5
|
|
5
6
|
|
6
7
|
class LogStash::Outputs::Circonus < LogStash::Outputs::Base
|
7
8
|
# This output lets you send annotations to
|
8
9
|
# Circonus based on Logstash events
|
9
|
-
#
|
10
|
+
#
|
10
11
|
|
11
12
|
config_name "circonus"
|
12
13
|
|
@@ -45,7 +46,7 @@ class LogStash::Outputs::Circonus < LogStash::Outputs::Base
|
|
45
46
|
@client = Net::HTTP.new(@uri.host, @uri.port)
|
46
47
|
@client.use_ssl = true
|
47
48
|
@client.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
48
|
-
|
49
|
+
|
49
50
|
end # def register
|
50
51
|
|
51
52
|
public
|
@@ -53,20 +54,20 @@ class LogStash::Outputs::Circonus < LogStash::Outputs::Base
|
|
53
54
|
# TODO (lusis)
|
54
55
|
# batch and flush
|
55
56
|
return unless output?(event)
|
56
|
-
|
57
|
+
|
57
58
|
annotation_event = Hash[*@annotation.collect{|k,v| [event.sprintf(k),event.sprintf(v)]}.flatten]
|
58
59
|
@logger.warn("Annotation event", :data => annotation_event)
|
59
|
-
|
60
|
+
|
60
61
|
annotation_array = []
|
61
62
|
annotation_path = "#{@uri.path}annotation"
|
62
63
|
@logger.warn("Annotation path", :data => annotation_path)
|
63
64
|
request = Net::HTTP::Post.new(annotation_path)
|
64
|
-
annotation_event['start'] = event
|
65
|
-
annotation_event['stop'] = event
|
65
|
+
annotation_event['start'] = event.timestamp.to_i unless annotation_event['start']
|
66
|
+
annotation_event['stop'] = event.timestamp.to_i unless annotation_event['stop']
|
66
67
|
@logger.warn("Annotation event", :data => annotation_event)
|
67
68
|
annotation_array << annotation_event
|
68
69
|
begin
|
69
|
-
request.set_form_data(:annotations => annotation_array
|
70
|
+
request.set_form_data(:annotations => LogStash::Json.dump(annotation_array))
|
70
71
|
@logger.warn(annotation_event)
|
71
72
|
request.add_field("X-Circonus-Auth-Token", "#{@api_token}")
|
72
73
|
request.add_field("X-Circonus-App-Name", "#{event.sprintf(@app_name)}")
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-output-circonus'
|
4
|
-
s.version = '0.1.
|
4
|
+
s.version = '0.1.5'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "This output lets you send annotations to Circonus based on Logstash events"
|
7
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"
|
metadata
CHANGED
@@ -1,17 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-output-circonus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
|
14
|
+
name: logstash-core
|
15
|
+
version_requirements: !ruby/object:Gem::Requirement
|
15
16
|
requirements:
|
16
17
|
- - '>='
|
17
18
|
- !ruby/object:Gem::Version
|
@@ -19,10 +20,7 @@ dependencies:
|
|
19
20
|
- - <
|
20
21
|
- !ruby/object:Gem::Version
|
21
22
|
version: 2.0.0
|
22
|
-
|
23
|
-
prerelease: false
|
24
|
-
type: :runtime
|
25
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirement: !ruby/object:Gem::Requirement
|
26
24
|
requirements:
|
27
25
|
- - '>='
|
28
26
|
- !ruby/object:Gem::Version
|
@@ -30,20 +28,22 @@ dependencies:
|
|
30
28
|
- - <
|
31
29
|
- !ruby/object:Gem::Version
|
32
30
|
version: 2.0.0
|
31
|
+
prerelease: false
|
32
|
+
type: :runtime
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
|
-
|
34
|
+
name: logstash-devutils
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
35
36
|
requirements:
|
36
37
|
- - '>='
|
37
38
|
- !ruby/object:Gem::Version
|
38
39
|
version: '0'
|
39
|
-
|
40
|
-
prerelease: false
|
41
|
-
type: :development
|
42
|
-
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirement: !ruby/object:Gem::Requirement
|
43
41
|
requirements:
|
44
42
|
- - '>='
|
45
43
|
- !ruby/object:Gem::Version
|
46
44
|
version: '0'
|
45
|
+
prerelease: false
|
46
|
+
type: :development
|
47
47
|
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
|
48
48
|
email: info@elastic.co
|
49
49
|
executables: []
|
@@ -51,9 +51,11 @@ extensions: []
|
|
51
51
|
extra_rdoc_files: []
|
52
52
|
files:
|
53
53
|
- .gitignore
|
54
|
+
- CHANGELOG.md
|
54
55
|
- CONTRIBUTORS
|
55
56
|
- Gemfile
|
56
57
|
- LICENSE
|
58
|
+
- NOTICE.TXT
|
57
59
|
- README.md
|
58
60
|
- Rakefile
|
59
61
|
- lib/logstash/outputs/circonus.rb
|