fluent-plugin-spectrum 0.0.2 → 0.0.3

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: 4a907d9e3749f2604e633e9d2e7d208b2595eca8
4
- data.tar.gz: 6bf4af623fa6d9aed08638ea59d474a694bf2e87
3
+ metadata.gz: 2d4288f068c625207769f4fa29e28d38f942ad83
4
+ data.tar.gz: fb7cbc18c897472e626cea9320d0680cfc2de45d
5
5
  SHA512:
6
- metadata.gz: b6d14688b87fa043d58a4eaef3394507a82c64b0178a7d32f435a00d5d1c6ea429a1ed44853cd8c4af268d997ca7d3a0748b78e40d4dbf2e75fc020440783266
7
- data.tar.gz: a48028226c73f7a715a43861ed31fe9eec1ecf2aac9ba7ec536a88cfa6ed39ba1b81b2314326fc1ea29021001115ba012266d206837b214fc2f3783407e91378
6
+ metadata.gz: 52fa80683e053aea5ae9cbc7a4575a6c7076fa72f01ebc6f650028e0ee36cc908cf6f7119c975de14f8099b4a5d50f11877ea6a726795b728dc27525851cf56c
7
+ data.tar.gz: 270493f647b3fa8d156941e27772b2f9f3662b8eb91f4c256edea218e72b5c1db04e54189b474884afa15505de36136ddc534f8ed11704aab8da8908fc8ff365
data/README.md CHANGED
@@ -20,30 +20,70 @@ Or install it yourself as:
20
20
  ## Usage
21
21
  Add the following into your fluentd config.
22
22
 
23
+ Simple:
24
+
23
25
  <source>
24
- type spectrum # required, choosing the input plugin
25
- endpoint spectrumapi.corp.yourdomain.net # required, FQDN of spectrum endpoint
26
- user username # required, username for APIs
27
- pass password # required, password for APIs
28
- tag alert.spectrum # optional, tag to assign to events, default is alert.spectrum
29
- interval 60 # optional, interval in seconds for how often to poll, defaults to 300
30
- include_raw false # optional, include original object as key raw
31
- </source>
26
+ type spectrum # required, choosing the input plugin
27
+ endpoint spectrum.yourdomain.com # required, FQDN of spectrum endpoint
28
+ user username # required, username for APIs
29
+ pass password # required, password for APIs
30
+ tag alert.spectrum # optional, tag to assign to events, default is alert.spectrum
31
+ interval 60 # optional, interval in seconds for how often to poll, defaults to 300
32
+ include_raw false # optional, include original object as key raw
33
+ </source>
32
34
 
33
35
  <match alert.spectrum>
34
- type stdout
36
+ type stdout
37
+ </match>
38
+
39
+ Advanced:
40
+
41
+ <source>
42
+ type spectrum # required, choosing the input plugin
43
+ endpoint spectrum.yourdomain.com # required, FQDN of spectrum endpoint
44
+ user username # required, username for APIs
45
+ pass password # required, password for APIs
46
+ tag alert.spectrum # optional, tag to assign to events, default is alert.spectrum
47
+ interval 60 # optional, interval in seconds for how often to poll, defaults to 300
48
+ include_raw true # optional, include original object as key raw
49
+ </source>
50
+ # using rename_key to map to new keynames
51
+ <match alert.spectrum>
52
+ type rename_key
53
+ deep_rename false
54
+ remove_tag_prefix alert.spectrum
55
+ append_tag alert
56
+ rename_rule1 HOSTNAME source_hostname
57
+ rename_rule2 IP_ADDRESS source_ip
58
+ rename_rule3 ALARM_TITLE event_name
59
+ rename_rule4 SEVERITY criticality
60
+ rename_rule5 CREATION_DATE creation_time
61
+ rename_rule6 ORIGINATING_EVENT_ATTR alert_description
62
+ rename_rule7 MODEL_STRING source_type
63
+ rename_rule8 ALARM_ID source_event_id
64
+ rename_rule9 GC_NAME environment
65
+ </match>
66
+ # using key_picker to remove extra fields
67
+ <match alert>
68
+ type key_picker
69
+ keys event_type,intermediary_source,source_event_id,creation_time,criticality,event_name,source_hostname,source_ip,alert_description,source_type,environment,raw
70
+ add_tag_prefix processed.
71
+ </match>
72
+ <match processed.alert>
73
+ type stdout
35
74
  </match>
36
75
 
37
76
  Now startup fluentd
38
77
 
39
78
  $ sudo fluentd -c fluent.conf &
40
79
 
41
- Send a test
42
- TBD
80
+ Send a test
81
+
82
+ TBD: Still need to create an example
43
83
 
44
84
  ## To Do
45
- Add retry login. On timeout/failure retry, how often, increasing delay? (how would that affect polling time, possible duplicates?)
46
- All flag to allow specifying spectrum attributes to get or get _ALL_
47
- Add flag to allow start date/time if users want to backfill data from a specific date. then start loop.
48
- Add flag to disable loop, if users only wanted to backfill from datetime to now or specific end time.
49
- change loop to allow multiple runs to stack on eachother to avoid missing data?
85
+ * Add retry login. On timeout/failure retry, how often, increasing delay? (how would that affect polling time, possible duplicates?)
86
+ * All flag to allow specifying spectrum attributes to get or get _ALL_
87
+ * Add flag to allow start date/time if users want to backfill data from a specific date. then start loop.
88
+ * Add flag to disable loop, if users only wanted to backfill from datetime to now or specific end time.
89
+ * Change loop to allow multiple runs to stack on eachother to avoid missing data?
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |gem|
5
5
  gem.name = "fluent-plugin-spectrum"
6
- gem.version = "0.0.2"
6
+ gem.version = "0.0.3"
7
7
  gem.date = '2015-02-24'
8
8
  gem.authors = ["Alex Pena"]
9
9
  gem.email = ["alex_pena@intuit.com"]
@@ -21,5 +21,5 @@ Gem::Specification.new do |gem|
21
21
 
22
22
  gem.add_runtime_dependency "fluentd", '~> 0.10', '>= 0.10.52'
23
23
  gem.add_runtime_dependency "json", '~> 1.1', '>= 1.8.2'
24
- gem.add_runtime_dependency "rest_client", '~> 1.1', '>= 1.8.3'
24
+ gem.add_runtime_dependency "rest-client", '~> 1.7', '>= 1.7.3'
25
25
  end
@@ -37,7 +37,7 @@ module Fluent
37
37
  end
38
38
 
39
39
  def initialize
40
- require 'rest_client'
40
+ require 'rest-client'
41
41
  require 'json'
42
42
  super
43
43
  end # def initialize
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-spectrum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Pena
@@ -71,25 +71,25 @@ dependencies:
71
71
  - !ruby/object:Gem::Version
72
72
  version: 1.8.2
73
73
  - !ruby/object:Gem::Dependency
74
- name: rest_client
74
+ name: rest-client
75
75
  requirement: !ruby/object:Gem::Requirement
76
76
  requirements:
77
77
  - - ~>
78
78
  - !ruby/object:Gem::Version
79
- version: '1.1'
79
+ version: '1.7'
80
80
  - - '>='
81
81
  - !ruby/object:Gem::Version
82
- version: 1.8.3
82
+ version: 1.7.3
83
83
  type: :runtime
84
84
  prerelease: false
85
85
  version_requirements: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ~>
88
88
  - !ruby/object:Gem::Version
89
- version: '1.1'
89
+ version: '1.7'
90
90
  - - '>='
91
91
  - !ruby/object:Gem::Version
92
- version: 1.8.3
92
+ version: 1.7.3
93
93
  description: Fluentd plugin for Spectrum Alerts... WIP
94
94
  email:
95
95
  - alex_pena@intuit.com