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 +4 -4
- data/README.md +56 -16
- data/fluent-plugin-spectrum.gemspec +2 -2
- data/lib/fluent/plugin/in_spectrum.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d4288f068c625207769f4fa29e28d38f942ad83
|
4
|
+
data.tar.gz: fb7cbc18c897472e626cea9320d0680cfc2de45d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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.
|
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 "
|
24
|
+
gem.add_runtime_dependency "rest-client", '~> 1.7', '>= 1.7.3'
|
25
25
|
end
|
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.
|
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:
|
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.
|
79
|
+
version: '1.7'
|
80
80
|
- - '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 1.
|
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.
|
89
|
+
version: '1.7'
|
90
90
|
- - '>='
|
91
91
|
- !ruby/object:Gem::Version
|
92
|
-
version: 1.
|
92
|
+
version: 1.7.3
|
93
93
|
description: Fluentd plugin for Spectrum Alerts... WIP
|
94
94
|
email:
|
95
95
|
- alex_pena@intuit.com
|