logstash-filter-cloudfoundry 0.2.0

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
+ SHA1:
3
+ metadata.gz: 165928e63355d42e3b36f00a8b7a4e6e978e0425
4
+ data.tar.gz: 637c3741d91e596dac3b14e916762458677c47bb
5
+ SHA512:
6
+ metadata.gz: 0e0c14a67cbfaf80ac9d18f4a190ef811fbb1bb98cc095625fe9f5eb8854982e597108feb3b655596a15abaa68906e4775c3ad455ae2d19ef33160c36dcdf656
7
+ data.tar.gz: e00c582b1ee0808015507954d41b26762e7a70814a3e36070896c8440f7e0f692cf88ec8e17aee90c5f07337eb93a6e5b0d1722c5021a5c0111b7bbffc16099f
data/.gitignore ADDED
@@ -0,0 +1,35 @@
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
+ /coverage/
5
+ /InstalledFiles
6
+ /pkg/
7
+ /spec/reports/
8
+ /test/tmp/
9
+ /test/version_tmp/
10
+ /tmp/
11
+
12
+ ## Specific to RubyMotion:
13
+ .dat*
14
+ .repl_history
15
+ build/
16
+
17
+ ## Documentation cache and generated files:
18
+ /.yardoc/
19
+ /_yardoc/
20
+ /doc/
21
+ /rdoc/
22
+
23
+ ## Environment normalisation:
24
+ /.bundle/
25
+ /vendor/bundle
26
+ /lib/bundler/man/
27
+
28
+ # for a library or gem, you might want to ignore these files since the code is
29
+ # intended to run in multiple environments; otherwise, check them in:
30
+ # Gemfile.lock
31
+ # .ruby-version
32
+ # .ruby-gemset
33
+
34
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
35
+ .rvmrc
data/.idea/.rakeTasks ADDED
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Settings><!--This file was automatically generated by Ruby plugin.
3
+ You are allowed to:
4
+ 1. Remove rake task
5
+ 2. Add existing rake tasks
6
+ To add existing rake tasks automatically delete this file and reload the project.
7
+ --><RakeGroup description="" fullCmd="" taksId="rake" /></Settings>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="RUBY_MODULE" version="4">
3
+ <component name="NewModuleRootManager">
4
+ <content url="file://$MODULE_DIR$" />
5
+ <orderEntry type="inheritedJdk" />
6
+ <orderEntry type="sourceFolder" forTests="false" />
7
+ </component>
8
+ </module>
data/.idea/misc.xml ADDED
@@ -0,0 +1,14 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectLevelVcsManager" settingsEditedManually="false">
4
+ <OptionsSetting value="true" id="Add" />
5
+ <OptionsSetting value="true" id="Remove" />
6
+ <OptionsSetting value="true" id="Checkout" />
7
+ <OptionsSetting value="true" id="Update" />
8
+ <OptionsSetting value="true" id="Status" />
9
+ <OptionsSetting value="true" id="Edit" />
10
+ <ConfirmationsSetting value="0" id="Add" />
11
+ <ConfirmationsSetting value="0" id="Remove" />
12
+ </component>
13
+ <component name="ProjectRootManager" version="2" project-jdk-name="ruby-2.3.1-p112" project-jdk-type="RUBY_SDK" />
14
+ </project>
data/.idea/modules.xml ADDED
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/logstash-filter-cloudfoundry.iml" filepath="$PROJECT_DIR$/.idea/logstash-filter-cloudfoundry.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
data/.idea/vcs.xml ADDED
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
+ </component>
6
+ </project>
@@ -0,0 +1,415 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ChangeListManager">
4
+ <list default="true" id="e567915e-ab4f-4430-ae1c-cc0957fd35a6" name="Default" comment="">
5
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/.rakeTasks" afterPath="$PROJECT_DIR$/.idea/.rakeTasks" />
6
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
7
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/logstash/filters/cloudfoundry.rb" afterPath="$PROJECT_DIR$/lib/logstash/filters/cloudfoundry.rb" />
8
+ </list>
9
+ <ignored path="logstash-filter-cloudfoundry.iws" />
10
+ <ignored path=".idea/workspace.xml" />
11
+ <ignored path=".idea/dataSources.local.xml" />
12
+ <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
13
+ <option name="TRACKING_ENABLED" value="true" />
14
+ <option name="SHOW_DIALOG" value="false" />
15
+ <option name="HIGHLIGHT_CONFLICTS" value="true" />
16
+ <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
17
+ <option name="LAST_RESOLUTION" value="IGNORE" />
18
+ </component>
19
+ <component name="CreatePatchCommitExecutor">
20
+ <option name="PATCH_PATH" value="" />
21
+ </component>
22
+ <component name="FavoritesManager">
23
+ <favorites_list name="logstash-filter-cloudfoundry" />
24
+ </component>
25
+ <component name="FileEditorManager">
26
+ <leaf SIDE_TABS_SIZE_LIMIT_KEY="375">
27
+ <file leaf-file-name="cloudfoundry.rb" pinned="false" current-in-tab="true">
28
+ <entry file="file://$PROJECT_DIR$/lib/logstash/filters/cloudfoundry.rb">
29
+ <provider selected="true" editor-type-id="text-editor">
30
+ <state relative-caret-position="131">
31
+ <caret line="14" column="11" selection-start-line="14" selection-start-column="11" selection-end-line="14" selection-end-column="11" />
32
+ <folding />
33
+ </state>
34
+ </provider>
35
+ </entry>
36
+ </file>
37
+ </leaf>
38
+ </component>
39
+ <component name="Git.Settings">
40
+ <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
41
+ </component>
42
+ <component name="IdeDocumentHistory">
43
+ <option name="CHANGED_PATHS">
44
+ <list>
45
+ <option value="$PROJECT_DIR$/lib/logstash/filters/cfapp.rb" />
46
+ <option value="$PROJECT_DIR$/Gemfile" />
47
+ <option value="$PROJECT_DIR$/logstash-filter-cloudfoundry.gemspec" />
48
+ <option value="$PROJECT_DIR$/lib/logstash/filters/cloudfoundry.rb" />
49
+ </list>
50
+ </option>
51
+ </component>
52
+ <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
53
+ <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
54
+ <component name="JsGulpfileManager">
55
+ <detection-done>true</detection-done>
56
+ <sorting>DEFINITION_ORDER</sorting>
57
+ </component>
58
+ <component name="ProjectFrameBounds">
59
+ <option name="x" value="-8" />
60
+ <option name="width" value="816" />
61
+ <option name="height" value="858" />
62
+ </component>
63
+ <component name="ProjectLevelVcsManager" settingsEditedManually="false">
64
+ <OptionsSetting value="true" id="Add" />
65
+ <OptionsSetting value="true" id="Remove" />
66
+ <OptionsSetting value="true" id="Checkout" />
67
+ <OptionsSetting value="true" id="Update" />
68
+ <OptionsSetting value="true" id="Status" />
69
+ <OptionsSetting value="true" id="Edit" />
70
+ <ConfirmationsSetting value="0" id="Add" />
71
+ <ConfirmationsSetting value="0" id="Remove" />
72
+ </component>
73
+ <component name="ProjectView">
74
+ <navigator currentView="ProjectPane" proportions="" version="1">
75
+ <flattenPackages />
76
+ <showMembers />
77
+ <showModules />
78
+ <showLibraryContents />
79
+ <hideEmptyPackages />
80
+ <abbreviatePackageNames />
81
+ <autoscrollToSource />
82
+ <autoscrollFromSource />
83
+ <sortByType />
84
+ <manualOrder />
85
+ <foldersAlwaysOnTop value="true" />
86
+ </navigator>
87
+ <panes>
88
+ <pane id="Scratches" />
89
+ <pane id="ProjectPane">
90
+ <subPane>
91
+ <PATH>
92
+ <PATH_ELEMENT>
93
+ <option name="myItemId" value="logstash-filter-cloudfoundry" />
94
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
95
+ </PATH_ELEMENT>
96
+ </PATH>
97
+ <PATH>
98
+ <PATH_ELEMENT>
99
+ <option name="myItemId" value="logstash-filter-cloudfoundry" />
100
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
101
+ </PATH_ELEMENT>
102
+ <PATH_ELEMENT>
103
+ <option name="myItemId" value="logstash-filter-cloudfoundry" />
104
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
105
+ </PATH_ELEMENT>
106
+ </PATH>
107
+ <PATH>
108
+ <PATH_ELEMENT>
109
+ <option name="myItemId" value="logstash-filter-cloudfoundry" />
110
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
111
+ </PATH_ELEMENT>
112
+ <PATH_ELEMENT>
113
+ <option name="myItemId" value="logstash-filter-cloudfoundry" />
114
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
115
+ </PATH_ELEMENT>
116
+ <PATH_ELEMENT>
117
+ <option name="myItemId" value="spec" />
118
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
119
+ </PATH_ELEMENT>
120
+ <PATH_ELEMENT>
121
+ <option name="myItemId" value="filters" />
122
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
123
+ </PATH_ELEMENT>
124
+ </PATH>
125
+ <PATH>
126
+ <PATH_ELEMENT>
127
+ <option name="myItemId" value="logstash-filter-cloudfoundry" />
128
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
129
+ </PATH_ELEMENT>
130
+ <PATH_ELEMENT>
131
+ <option name="myItemId" value="logstash-filter-cloudfoundry" />
132
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
133
+ </PATH_ELEMENT>
134
+ <PATH_ELEMENT>
135
+ <option name="myItemId" value="lib" />
136
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
137
+ </PATH_ELEMENT>
138
+ <PATH_ELEMENT>
139
+ <option name="myItemId" value="logstash" />
140
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
141
+ </PATH_ELEMENT>
142
+ <PATH_ELEMENT>
143
+ <option name="myItemId" value="filters" />
144
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
145
+ </PATH_ELEMENT>
146
+ </PATH>
147
+ </subPane>
148
+ </pane>
149
+ <pane id="Scope" />
150
+ </panes>
151
+ </component>
152
+ <component name="PropertiesComponent">
153
+ <property name="last_opened_file_path" value="$PROJECT_DIR$" />
154
+ <property name="WebServerToolWindowFactoryState" value="false" />
155
+ </component>
156
+ <component name="RunManager">
157
+ <configuration default="true" type="CucumberRunConfigurationType" factoryName="Cucumber">
158
+ <predefined_log_file id="RUBY_CUCUMBER" enabled="true" />
159
+ <module name="" />
160
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
161
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
162
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
163
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
164
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
165
+ <envs />
166
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
167
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
168
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov" />
169
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*.feature" />
170
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
171
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
172
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
173
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_TAGS_FILTER" VALUE="" />
174
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="TEST_NAME_FILTER" VALUE="" />
175
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="CUCUMBER_ARGS" VALUE="--color -r features" />
176
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
177
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
178
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="VERBOSE_OPTION" VALUE="false" />
179
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
180
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
181
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
182
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="CUCUMBER_RUNNER_PATH" VALUE="" />
183
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_RUNNER" VALUE="false" />
184
+ <CUCUMBER_RUN_CONFIG_SETTINGS_ID NAME="SETTINGS_VERSION" VALUE="2" />
185
+ <method />
186
+ </configuration>
187
+ <configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug">
188
+ <method />
189
+ </configuration>
190
+ <configuration default="true" type="RSpecRunConfigurationType" factoryName="RSpec">
191
+ <predefined_log_file id="RUBY_RSPEC" enabled="true" />
192
+ <module name="" />
193
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
194
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
195
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
196
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
197
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
198
+ <envs />
199
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
200
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
201
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov" />
202
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
203
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
204
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
205
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
206
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="" />
207
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
208
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
209
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
210
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
211
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
212
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
213
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
214
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
215
+ <method />
216
+ </configuration>
217
+ <configuration default="true" type="RubyRunConfigurationType" factoryName="Ruby">
218
+ <module name="" />
219
+ <RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
220
+ <RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="" />
221
+ <RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
222
+ <RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
223
+ <RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
224
+ <envs />
225
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
226
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
227
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov" />
228
+ <RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="" />
229
+ <RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
230
+ <method />
231
+ </configuration>
232
+ <configuration default="true" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest">
233
+ <predefined_log_file id="RUBY_TESTUNIT" enabled="true" />
234
+ <module name="" />
235
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
236
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
237
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
238
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
239
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
240
+ <envs />
241
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
242
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
243
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov" />
244
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
245
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
246
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="" />
247
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="" />
248
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
249
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
250
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
251
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
252
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_OPTIONS" VALUE="" />
253
+ <method />
254
+ </configuration>
255
+ <configuration default="true" type="js.build_tools.gulp" factoryName="Gulp.js">
256
+ <node-interpreter>project</node-interpreter>
257
+ <node-options />
258
+ <gulpfile />
259
+ <tasks />
260
+ <arguments />
261
+ <envs />
262
+ <method />
263
+ </configuration>
264
+ <configuration default="true" type="js.build_tools.npm" factoryName="npm">
265
+ <command value="run-script" />
266
+ <scripts />
267
+ <node-interpreter value="project" />
268
+ <envs />
269
+ <method />
270
+ </configuration>
271
+ </component>
272
+ <component name="ShelveChangesManager" show_recycled="false">
273
+ <option name="remove_strategy" value="false" />
274
+ </component>
275
+ <component name="SvnConfiguration">
276
+ <configuration />
277
+ </component>
278
+ <component name="TaskManager">
279
+ <task active="true" id="Default" summary="Default task">
280
+ <changelist id="e567915e-ab4f-4430-ae1c-cc0957fd35a6" name="Default" comment="" />
281
+ <created>1470874019727</created>
282
+ <option name="number" value="Default" />
283
+ <option name="presentableId" value="Default" />
284
+ <updated>1470874019727</updated>
285
+ <workItem from="1470874020962" duration="11174000" />
286
+ <workItem from="1471752668597" duration="2806000" />
287
+ <workItem from="1474068765791" duration="1676000" />
288
+ <workItem from="1474074883900" duration="8519000" />
289
+ </task>
290
+ <servers />
291
+ </component>
292
+ <component name="TimeTrackingManager">
293
+ <option name="totallyTimeSpent" value="24175000" />
294
+ </component>
295
+ <component name="ToolWindowManager">
296
+ <frame x="-8" y="0" width="816" height="858" extended-state="0" />
297
+ <editor active="false" />
298
+ <layout>
299
+ <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.44486216" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
300
+ <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
301
+ <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32802126" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
302
+ <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32503277" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
303
+ <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
304
+ <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
305
+ <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
306
+ <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
307
+ <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
308
+ <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
309
+ <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
310
+ <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
311
+ <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
312
+ <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
313
+ <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
314
+ <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32934928" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
315
+ <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
316
+ <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
317
+ </layout>
318
+ </component>
319
+ <component name="Vcs.Log.UiProperties">
320
+ <option name="RECENTLY_FILTERED_USER_GROUPS">
321
+ <collection />
322
+ </option>
323
+ <option name="RECENTLY_FILTERED_BRANCH_GROUPS">
324
+ <collection />
325
+ </option>
326
+ </component>
327
+ <component name="VcsContentAnnotationSettings">
328
+ <option name="myLimit" value="2678400000" />
329
+ </component>
330
+ <component name="XDebuggerManager">
331
+ <breakpoint-manager />
332
+ <watches-manager />
333
+ </component>
334
+ <component name="editorHistoryManager">
335
+ <entry file="file://$PROJECT_DIR$/lib/logstash/filters/cloudfoundry.rb">
336
+ <provider selected="true" editor-type-id="text-editor">
337
+ <state relative-caret-position="0">
338
+ <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
339
+ <folding />
340
+ </state>
341
+ </provider>
342
+ </entry>
343
+ <entry file="file://$PROJECT_DIR$/lib/logstash/filters/cloudfoundry.rb">
344
+ <provider selected="true" editor-type-id="text-editor">
345
+ <state relative-caret-position="0">
346
+ <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
347
+ <folding />
348
+ </state>
349
+ </provider>
350
+ </entry>
351
+ <entry file="file://$PROJECT_DIR$/lib/logstash/filters/cloudfoundry.rb">
352
+ <provider selected="true" editor-type-id="text-editor">
353
+ <state relative-caret-position="2193">
354
+ <caret line="129" column="29" selection-start-line="129" selection-start-column="29" selection-end-line="129" selection-end-column="29" />
355
+ <folding />
356
+ </state>
357
+ </provider>
358
+ </entry>
359
+ <entry file="file://$PROJECT_DIR$/Gemfile">
360
+ <provider selected="true" editor-type-id="text-editor">
361
+ <state relative-caret-position="34">
362
+ <caret line="2" column="63" selection-start-line="2" selection-start-column="63" selection-end-line="2" selection-end-column="63" />
363
+ <folding />
364
+ </state>
365
+ </provider>
366
+ </entry>
367
+ <entry file="file://$PROJECT_DIR$/logstash-filter-cloudfoundry.gemspec">
368
+ <provider selected="true" editor-type-id="text-editor">
369
+ <state relative-caret-position="0">
370
+ <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
371
+ </state>
372
+ </provider>
373
+ </entry>
374
+ <entry file="file://$PROJECT_DIR$/CONTRIBUTORS" />
375
+ <entry file="file://$PROJECT_DIR$/CHANGELOG.md" />
376
+ <entry file="file://$PROJECT_DIR$/.gitignore">
377
+ <provider selected="true" editor-type-id="text-editor">
378
+ <state relative-caret-position="0">
379
+ <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
380
+ </state>
381
+ </provider>
382
+ </entry>
383
+ <entry file="file://$PROJECT_DIR$/spec/spec_helper.rb" />
384
+ <entry file="file://$PROJECT_DIR$/logstash-filter-cloudfoundry.gemspec">
385
+ <provider selected="true" editor-type-id="text-editor">
386
+ <state relative-caret-position="340">
387
+ <caret line="20" column="60" selection-start-line="20" selection-start-column="60" selection-end-line="20" selection-end-column="60" />
388
+ </state>
389
+ </provider>
390
+ </entry>
391
+ <entry file="file://$PROJECT_DIR$/Gemfile">
392
+ <provider selected="true" editor-type-id="text-editor">
393
+ <state relative-caret-position="34">
394
+ <caret line="2" column="63" selection-start-line="2" selection-start-column="63" selection-end-line="2" selection-end-column="63" />
395
+ <folding />
396
+ </state>
397
+ </provider>
398
+ </entry>
399
+ <entry file="file://C:/Ruby23/lib/ruby/2.3.0/json/common.rb">
400
+ <provider selected="true" editor-type-id="text-editor">
401
+ <state relative-caret-position="243">
402
+ <caret line="154" column="6" selection-start-line="154" selection-start-column="6" selection-end-line="154" selection-end-column="6" />
403
+ </state>
404
+ </provider>
405
+ </entry>
406
+ <entry file="file://$PROJECT_DIR$/lib/logstash/filters/cloudfoundry.rb">
407
+ <provider selected="true" editor-type-id="text-editor">
408
+ <state relative-caret-position="131">
409
+ <caret line="14" column="11" selection-start-line="14" selection-start-column="11" selection-end-line="14" selection-end-column="11" />
410
+ <folding />
411
+ </state>
412
+ </provider>
413
+ </entry>
414
+ </component>
415
+ </project>
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+ gemspec
3
+ gem "logstash", :github => "elastic/logstash", :branch => "2.3"
data/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "{}"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright {yyyy} {name of copyright owner}
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
202
+
data/README.md ADDED
@@ -0,0 +1,86 @@
1
+ # Logstash Plugin
2
+
3
+ This is a plugin for [Logstash](https://github.com/elasticsearch/logstash).
4
+
5
+ It is fully free and fully open source. The license is Apache 2.0, meaning you are pretty much free to use it however you want in whatever way.
6
+
7
+ ## Documentation
8
+
9
+ Logstash provides infrastructure to automatically generate documentation for this plugin. We use the asciidoc format to write documentation so any comments in the source code will be first converted into asciidoc and then into html. All plugin documentation are placed under one [central location](http://www.elasticsearch.org/guide/en/logstash/current/).
10
+
11
+ - For formatting code or config example, you can use the asciidoc `[source,ruby]` directive
12
+ - For more asciidoc formatting tips, see the excellent reference here https://github.com/elasticsearch/docs#asciidoc-guide
13
+
14
+ ## Need Help?
15
+
16
+ Need help? Try #logstash on freenode IRC or the https://discuss.elastic.co/c/logstash discussion forum.
17
+
18
+ ## Developing
19
+
20
+ ### 1. Plugin Developement and Testing
21
+
22
+ #### Code
23
+ - To get started, you'll need JRuby with the Bundler gem installed.
24
+
25
+ - Create a new plugin or clone and existing from the GitHub [logstash-plugins](https://github.com/logstash-plugins) organization. We also provide [example plugins](https://github.com/logstash-plugins?query=example).
26
+
27
+ - Install dependencies
28
+ ```sh
29
+ bundle install
30
+ ```
31
+
32
+ #### Test
33
+
34
+ - Update your dependencies
35
+
36
+ ```sh
37
+ bundle install
38
+ ```
39
+
40
+ - Run tests
41
+
42
+ ```sh
43
+ bundle exec rspec
44
+ ```
45
+
46
+ ### 2. Running your unpublished Plugin in Logstash
47
+
48
+ #### 2.1 Run in a local Logstash clone
49
+
50
+ - Edit Logstash `Gemfile` and add the local plugin path, for example:
51
+ ```ruby
52
+ gem "logstash-filter-awesome", :path => "/your/local/logstash-filter-awesome"
53
+ ```
54
+ - Install plugin
55
+ ```sh
56
+ bin/plugin install --no-verify
57
+ ```
58
+ - Run Logstash with your plugin
59
+ ```sh
60
+ bin/logstash -e 'filter {awesome {}}'
61
+ ```
62
+ At this point any modifications to the plugin code will be applied to this local Logstash setup. After modifying the plugin, simply rerun Logstash.
63
+
64
+ #### 2.2 Run in an installed Logstash
65
+
66
+ You can use the same **2.1** method to run your plugin in an installed Logstash by editing its `Gemfile` and pointing the `:path` to your local plugin development directory or you can build the gem and install it using:
67
+
68
+ - Build your plugin gem
69
+ ```sh
70
+ gem build logstash-filter-awesome.gemspec
71
+ ```
72
+ - Install the plugin from the Logstash home
73
+ ```sh
74
+ bin/plugin install /your/local/plugin/logstash-filter-awesome.gem
75
+ ```
76
+ - Start Logstash and proceed to test the plugin
77
+
78
+ ## Contributing
79
+
80
+ All contributions are welcome: ideas, patches, documentation, bug reports, complaints, and even something you drew up on a napkin.
81
+
82
+ Programming is not a required skill. Whatever you've seen about open source and maintainers or community members saying "send patches or die" - you will not see that here.
83
+
84
+ It is more important to the community that you are able to contribute.
85
+
86
+ For more information about contributing, see the [CONTRIBUTING](https://github.com/elasticsearch/logstash/blob/master/CONTRIBUTING.md) file.
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "logstash/devutils/rake"
@@ -0,0 +1,239 @@
1
+ # encoding: utf-8
2
+
3
+ require "logstash/filters/base"
4
+ require "logstash/namespace"
5
+ require "json"
6
+ require "open-uri"
7
+ require "rufus/scheduler"
8
+ require "open3"
9
+
10
+ # The Cloud Foundry filter performs a lookup against a Cloud Foundry foundation to provide the following pieces of
11
+ # meta-data to an application log
12
+ # - Org name
13
+ # - Space name
14
+ # - Application name
15
+ #
16
+ #The conf should look like this:
17
+ # filter{
18
+ # cloudfoundry{
19
+ # cf_api => "https://api.cf-domain.com"
20
+ # cf_user => username
21
+ # cf_password => password
22
+ # cf_org => "system"
23
+ # cf_space => "apps_manager"
24
+ # }
25
+ # }
26
+ #
27
+ # This filter, only processes 1 event at a time, so the use of this plugin can significantly slow down your pipeline's
28
+ # throughput if you have a high latency network. In the event of an outage (network or cloud foundry infrastructure), a
29
+ # retry flag can bet set to reduce the number of failed log-in and curl attempts to the Cloud Foundry endpoint. This
30
+ # will allow the pipeline to function without severely impacting throughput. Additionally adjusting the cache flush
31
+ # period and a cache items TTL will reduce slow down to your pipeline's throughput at the cost of additional resource
32
+ # consumption.
33
+ #
34
+ # Currently, this filter can only handle logs from a single Cloud Foundry foundation. Due to a limitation with the
35
+ # Cloud Foundry CLI (command line interface) only a single foundation can be logged into at a time. This causes race
36
+ # conditions that this plugin currently won't handle gracefully.
37
+
38
+ class LogStash::Filters::CloudFoundry < LogStash::Filters::Base
39
+ #TODO: Multi-foundation suppport
40
+ #TODO: Pull "log-type" field from raw Cloud Foundry log
41
+ #TODO: Determine windows equivalent of a linux "timeout" command to improve pipeline throughput during an outage
42
+
43
+ config_name "cloudfoundry"
44
+
45
+ # Cloud Foundry API endpoing
46
+ config :cf_api, :validate => :string
47
+
48
+ # Users Cloud Foundry username
49
+ config :cf_user, :validate => :string
50
+
51
+ # Users Cloud Foundry password
52
+ config :cf_password, :validate => :string
53
+
54
+ # Any Cloud Foundry Org that a users account has access to
55
+ config :cf_org, :validate => :string
56
+
57
+ # Any Cloud Foundry Space that a users account has access to
58
+ config :cf_space, :validate => :string
59
+
60
+ # Skip SSL validation while loging into the endpoint
61
+ config :skip_ssl_validation, :validate => :boolean, :default => true
62
+
63
+ # How often scheduler is run to clean up cache
64
+ config :cache_flush_time, :validate => :string, :default => "10m"
65
+
66
+ # A cache items time to live
67
+ config :cache_age_time, :validate => :number, :default => 600
68
+
69
+ # After a failed attempt to reach the Cloud Foundry endpoint, how long should the plugin wait before using the cf CLI again
70
+ config :cf_retry_cli_timeout, :validate => :number, :default => 0
71
+
72
+ # If the the Cloud Foundry API can not find GUID, cache it so plugin won't want resouces continuously curling it
73
+ config :cache_invalid_guids, :validate => :boolean, :default => false
74
+
75
+ public
76
+ def register
77
+
78
+ if @cf_api.empty? || @cf_user.empty? || @cf_password.empty? || @cf_org.empty? || @cf_space.empty?
79
+ raise "Required paramters where left blank."
80
+ end
81
+
82
+ @app_cache = Hash.new
83
+ @app_cache_mutex = Mutex.new
84
+ @scheduler = Rufus::Scheduler.new
85
+ @job = @scheduler.every(@cache_flush_time) do
86
+ begin
87
+ @app_cache_mutex.synchronize {
88
+ @app_cache.delete_if { |key, value| value["expire_at"]<Time.now.to_i }
89
+ }
90
+ rescue Exception => msg
91
+ @logger.error("Error purging app info cache: #{msg}")
92
+ end
93
+ end
94
+
95
+ login_query = cflogin
96
+ raise "CF-login-failed: #{login_query[:stdout]}" unless login_query[:status]
97
+
98
+ @cf_retry_cli_timeout > 0 ? @cf_retry_cli = true : @cf_retry_cli = false
99
+ @login_next = Time.now.to_i
100
+ @cf_logged_in = true
101
+
102
+ rescue Exception => e
103
+
104
+ @cf_retry_cli = false
105
+ @cf_logged_in = false
106
+ @logger.error("Exception: #{e.inspect}. Filter won't be applied")
107
+ @logger.error("Backtrace: #{e.backtrace}")
108
+
109
+ end # def register
110
+
111
+ public
112
+ def filter(event)
113
+
114
+ if @cf_logged_in
115
+
116
+ message = event["message"]
117
+ app_guid = message[/loggregator ([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})/, 1]
118
+
119
+ unless app_guid.nil?
120
+
121
+ event["appguid"] = app_guid
122
+ app_cache_item = nil
123
+ @app_cache_mutex.synchronize { app_cache_item = @app_cache[app_guid] }
124
+
125
+ if app_cache_item.nil?
126
+
127
+ app_query = cfcurl("/v2/apps/#{app_guid}")
128
+ validate_query(app_query, app_guid)
129
+
130
+ space_query = cfcurl("/v2/spaces/#{app_query[:stdout]["entity"]["space_guid"]}")
131
+ validate_query(space_query)
132
+
133
+ org_query = cfcurl("/v2/organizations/#{space_query[:stdout]["entity"]["organization_guid"]}")
134
+ validate_query(org_query)
135
+
136
+ app_info = Hash.new()
137
+ app_info["appname"] = app_query[:stdout]["entity"]["name"]
138
+ app_info["spacename"] = space_query[:stdout]["entity"]["name"]
139
+ app_info["orgname"] = org_query[:stdout]["entity"]["name"]
140
+
141
+ app_cache_item = Hash.new()
142
+ app_cache_item["info"] = app_info
143
+ app_cache_item["expire_at"] = Time.now.to_i + @cache_age_time
144
+ @app_cache_mutex.synchronize { @app_cache[app_guid] = app_cache_item }
145
+
146
+ else
147
+ app_info = app_cache_item['info']
148
+ end
149
+ app_info.each { |k,v| event[k] = v }
150
+ end
151
+
152
+ else
153
+
154
+ if @login_next <= Time.now.to_i && @cf_retry_cli
155
+ login_query = cflogin
156
+ raise "CF-login-failed: #{login_query[:stdout]}" unless login_query[:status]
157
+ @cf_logged_in = true
158
+ end
159
+
160
+ end
161
+
162
+ filter_matched(event)
163
+
164
+ rescue Exception => e
165
+
166
+ if e.inspect.include?("CF-curl-failed") || e.inspect.include?("CF-login-failed")
167
+ @logger.error("Exception: #{e.inspect}.")
168
+ @login_next = Time.now.to_i + @cf_retry_cli_timeout
169
+ @cf_logged_in = false
170
+ else
171
+ @logger.error("Exception: #{e.inspect}")
172
+ end
173
+ @logger.error("Backtrace: #{e.backtrace}")
174
+
175
+ end # def filter
176
+
177
+ private
178
+ def validate_query(query, guid = "")
179
+
180
+ if query[:status]
181
+ if query[:stdout]['metadata'].nil?
182
+
183
+ if @cache_invalid_guids && !guid.blank?
184
+ @app_cache_mutex.synchronize { @app_cache[guid] = {"info" => {}, "expire_at" => Time.now.to_i + @cache_age_time} }
185
+ end
186
+
187
+ raise "CF-curl-inavlid: #{query[:stdout]}"
188
+ end
189
+ else
190
+ raise "CF-curl-failed: #{query[:stdout]}"
191
+ end
192
+
193
+ end # def validate_query
194
+
195
+ private
196
+ def cfcurl(path, body = nil)
197
+
198
+ if body.nil?
199
+ cf('curl ' + URI::encode(path))
200
+ else
201
+ cf('curl ' + URI::encode(path) + ' -d "' + body.gsub('"', '\"') + '"')
202
+ end
203
+
204
+ end # def cfcurl
205
+
206
+ private
207
+ def cflogin
208
+
209
+ cf( 'login' +
210
+ (@skip_ssl_validation ? ' --skip-ssl-validation' : '') +
211
+ ' -a ' + @cf_api +
212
+ ' -u ' + @cf_user +
213
+ ' -p ' + @cf_password +
214
+ ' -o ' + @cf_org +
215
+ ' -s ' + @cf_space )
216
+
217
+ end # def cflogin
218
+
219
+ private
220
+ def cf(cmd)
221
+
222
+ stdout, stderr, status = Open3.capture3("cf #{cmd}")
223
+ command_output = { :stdout => valid_json?(stdout), :stderr => stderr, :status => status.success?}
224
+ command_output
225
+
226
+ end # def cf
227
+
228
+ private
229
+ def valid_json?(stdout)
230
+
231
+ begin
232
+ JSON.parse(stdout)
233
+ rescue Exception => e
234
+ stdout
235
+ end
236
+
237
+ end # def valid_json?
238
+
239
+ end # class Logstash::Filters::CloudFoundry
@@ -0,0 +1,30 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = 'logstash-filter-cloudfoundry'
3
+ s.version = '0.2.0'
4
+ s.licenses = ['Apache License (2.0)']
5
+ s.summary = "Plugin used to assign meta-data to cloud foundry logs"
6
+ s.description = "This filter will add App, Space, and Org metadata to CloudFoundry logs. 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"
7
+ s.authors = ["Tyler Stigliano"]
8
+ s.email = 'info@elastic.co'
9
+ s.homepage = "https://github.com/ahahtyler/logstash-filter-cloudfoundry"
10
+ s.require_paths = ["lib"]
11
+
12
+ # Files
13
+ s.files = `git ls-files`.split($\)
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", '>= 1.5.0', '< 3.0.0'
22
+ #s.add_runtime_dependency "json"
23
+ #s.add_runtime_dependency "open-uri"
24
+ #s.add_runtime_dependency "rufus/scheduler"
25
+ #s.add_runtime_dependency "open3"
26
+
27
+ s.add_development_dependency 'logstash-devutils'
28
+ end
29
+
30
+
@@ -0,0 +1,20 @@
1
+ require 'spec_helper'
2
+ require "logstash/filters/cloudfoundry"
3
+
4
+ describe LogStash::Filters::CloudFoundry do
5
+
6
+ describe "Set to Hello World" do
7
+ let(:config) do <<-CONFIG
8
+ filter {
9
+ cloudfoundry {
10
+ }
11
+ }
12
+ CONFIG
13
+ end
14
+
15
+ sample("message" => "some text") do
16
+ expect(subject).to include("message")
17
+ expect(subject['message']).to eq('Hello World')
18
+ end
19
+ end
20
+ end
metadata ADDED
@@ -0,0 +1,97 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: logstash-filter-cloudfoundry
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.0
5
+ platform: ruby
6
+ authors:
7
+ - Tyler Stigliano
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-09-20 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: logstash-core
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 1.5.0
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: 3.0.0
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: 1.5.0
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: 3.0.0
33
+ - !ruby/object:Gem::Dependency
34
+ name: logstash-devutils
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
40
+ type: :development
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ description: This filter will add App, Space, and Org metadata to CloudFoundry logs.
48
+ This gem is a logstash plugin required to be installed on top of the Logstash core
49
+ pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone
50
+ program
51
+ email: info@elastic.co
52
+ executables: []
53
+ extensions: []
54
+ extra_rdoc_files: []
55
+ files:
56
+ - ".gitignore"
57
+ - ".idea/.rakeTasks"
58
+ - ".idea/logstash-filter-cloudfoundry.iml"
59
+ - ".idea/misc.xml"
60
+ - ".idea/modules.xml"
61
+ - ".idea/vcs.xml"
62
+ - ".idea/workspace.xml"
63
+ - Gemfile
64
+ - LICENSE
65
+ - README.md
66
+ - Rakefile
67
+ - lib/logstash/filters/cloudfoundry.rb
68
+ - logstash-filter-cloudfoundry.gemspec
69
+ - spec/filters/cloudfoundry_spec.rb
70
+ homepage: https://github.com/ahahtyler/logstash-filter-cloudfoundry
71
+ licenses:
72
+ - Apache License (2.0)
73
+ metadata:
74
+ logstash_plugin: 'true'
75
+ logstash_group: filter
76
+ post_install_message:
77
+ rdoc_options: []
78
+ require_paths:
79
+ - lib
80
+ required_ruby_version: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ version: '0'
85
+ required_rubygems_version: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ requirements: []
91
+ rubyforge_project:
92
+ rubygems_version: 2.4.8
93
+ signing_key:
94
+ specification_version: 4
95
+ summary: Plugin used to assign meta-data to cloud foundry logs
96
+ test_files:
97
+ - spec/filters/cloudfoundry_spec.rb