Commit graph

3725 commits

Author SHA1 Message Date
Jordan Sissel
12d8e82df6 Add metadata via @metadata field
This makes @metadata basically a way to store data along with an event
that is *NOT* included when serialized to an output.

Use cases:
- For elasticsearch output, set the index, type, document_id, routing
  key, etc with metadata and you won't be burdened by storing a filed
  named 'index' in your document!
- For elasticsearch input, we can set @metadata fields for the
  index/type/document_id instead of polluting the event data itself.
- No need for "short-lived fields" such as timestamps. For example, a
  common pattern is to use grok to capture a timestamp text  and give that
  to the date filter and finally use mutate to remove that captured text
  field.
- Provide a kind of scratch space for events that are not part of the
  event data.

Fixes #1834

Fixes #1836
2014-10-10 21:34:59 +00:00
Chen,Hao
4a3194bda5 ElasticSearch output plugin to support multiple hosts and enhance stability. (by Hao Chen)
Closes #1791
2014-10-09 17:24:14 -07:00
Colin Surprenant
b6c8e96480 gem bundling refactor
update jruby jar to 1.7.15

pinned i18n dependency and cosmetic cleanups

new generated Gemfile lock

refactor gem bundling using stadalone setup & use standard Gemfile with gemspec

update to jruby 1.7.16 and remove jar-dependencies, bouncy-castle-java, jruby-openssl from gemspec

get ready for future plugins mechanism
2014-10-06 17:02:48 -04:00
Jordan Sissel
dc079df736 codec/line: do charset conversion on flush
Add tests to verify line codec does charset conversion on flush.

Fixes #1520
2014-10-02 16:31:56 +00:00
Suyog Rao
284ec9f049 remove kafka source since they moved to separate plugin
Closes #1801
2014-09-30 14:37:33 -07:00
Richard Pijnenburg
51b3bf46c4 [RSPEC] Refactoring step 1
- Move helper functions in own modules and extend Rspec
- Refactor files into correct naming and paths
- Modify files to use new spec_helper and helpers
- Pin rspec to 2.14.x

Fixes #1758
2014-09-30 16:06:46 +00:00
Jordan Sissel
f7d7a7532a Set the string encoding when parsing XML
Improves upon #1790

Fixes #1803
2014-09-29 23:59:58 +00:00
wiibaa
7395512761 filter/xml fix for LOGSTASH-2246: extract non-ascii content with xpath
Fixes #1803
2014-09-29 23:59:58 +00:00
Joao Duarte
96c5e32f1f Fix add_tag behaviour in dns filter
The filter should only modify the event's fields and tags if and only if
all resolves/reverses succeed. So we clone the event, modify the new
copy and return it if all operations succeed. Otherwise the original
event is not modified.

For performance reasons we could reverse the clone logic: clone the
event, modify the original event and, it case of failure, return the
backup.

Note: this changes the dns filter behaviour towards add_tag

Fixes #1795
2014-09-29 22:52:28 +00:00
James Turnbull
19c6caa6d7 Updated link in syslog documentation
Fixes #1724
2014-09-27 05:53:35 +00:00
Colin Surprenant
e4ac936f0c honor common to_json method signature
Fixes #1772
2014-09-27 05:44:23 +00:00
Colin Surprenant
d2f6118124 support :symbolize_keys options for json parsing
Fixes #1450
2014-09-27 05:40:20 +00:00
Colin Surprenant
a78f6bafd1 monkey patch twitter gem to trap json parsing exceptions and use our own json parser
Fixes #1450
2014-09-27 05:40:20 +00:00
Colin Surprenant
10ac156f3e add robustness to tweets stream handling
Fixes #1450
2014-09-27 05:40:20 +00:00
Colin Surprenant
bf11118709 stringify all symbols in twitter hash
Fixes #1450
2014-09-27 05:40:20 +00:00
Joao Duarte
a536eefad2 spec the absense and wrong commands
PR: #1752
2014-09-27 04:57:33 +00:00
Joao Duarte
b0091b242c Remove the ability to run multiple commands
Addresses #1747.
This removes the argument list iteration and spawning of multiple
tasks.
It's still possible to specify aditional arguments but now they're
ignored.

PR: #1752
2014-09-27 04:57:21 +00:00
wiibaa
01e9f37591 test and fix for LOGSTASH-2288 2014-09-23 07:21:05 +02:00
Joseph Lawson
9c16d78a66 this should fix logstash #1738
Closes #1738
2014-09-15 20:21:44 -07:00
Richard Pijnenburg
9398cd65a1 Move logstash gemspec loading into environment module
Previously the loading of the logstash gemspec was limited to the plugin manager
After more tests we need the gemspec to be loaded for any action with the plugins
Moving it to the environment module makes it available for more generic loading

Make sure plugin manager uses new function for loading gemspec
2014-09-15 16:01:22 +01:00
Richard Pijnenburg
d65706ded4 Improvements to plugin manager
- Use better installer method to avoid documentation installation
  With the previous method it would install the documentation which didn't exist.

- Create Fake gemspec info for logstash to help dependency management for plugins
  Previously we would create a real gem and install it to aid in dependency management for plugins and logstash
  Now we create a fake gemspec on the fly with the real version of logstash avoiding having to build it every time.
2014-09-10 10:00:00 +00:00
Tray Torrance
bf953f0f90 Fixes finterprint filter handling of timestamp field
Fixes #1572
2014-09-08 11:57:36 +01:00
Jordan Sissel
4211522de1 Add recurse method for doing breadth-first traversal of the AST
This will be used by the filter flush compiler

Add generation of a flush lambda for each filter.

This allows filters to flush and have any generated events proceed
downward through the config as you would expect, respecting any
branches or future plugins.

Die on IOError which occurs when reading from a closed STDIN

Make filter_flusher invoke the new (and correct, I hope!) way to flush.

- On shutdown, we will also flush all filters.
- The flusher thread will terminate if we are shutting down.

Clarify the comment

Fix comment generation in the code to avoid newlines.

Add 'max_age' setting to multiline for flushing.

This setting chooses how long (in seconds) an event is considered to be
fresh before it will be automatically flushed.

This is useful for:
* slow log sources to get the 'last event' flushed,
* transaction-id-style events that have no obvious "end" event and also
  are mixed among other-id events in the same stream.

Also:
- Make filters have no teardown by default.
- Remove 'enable_flush' since it is not needed anymore; flush is always
  enabled.

refactor flush

new spool filter and specs, mainly for testing flushing

turn off unrelated test error for now

fix the flush logic, fix the flush compiles code to not include output section

synchronize cross-thread  access to @pending

refactor for performance and readability

synchronize cross-thread access to @spool

unused code

input:udp removed boggus ShutdownSignal handling, morphed loop do into while true, cosmetic reformat

use transcient events and not exceptions for in-flow pipeline signaling

inline flushing into  filterworker

removed now unnecessary flushing thread safety

fix conditionals bug for new events generated by filters & specs

spec for issue #793

performance tweeks

simplify filter handling of events and new_events

this removes unecessary duplication when treating the original event as
a special case (different from new_events generated by a filter).
Also, since @filter_func only outputs non-cancelled events, some checks
were also removed.

Move multiple filter specs to a filter_chains file

append events generated by a filter using unshift instead of insert

closes #793, closes #1429, closes #1431, closes #1548
2014-09-05 18:45:22 -04:00
Suyog Rao
01f5c753fb Merge remote-tracking branch 'upstream/master' 2014-09-05 12:18:15 -07:00
Suyog Rao
cff7c37603 Dont add kafka metadata by default
Closes #1691
2014-09-05 12:15:54 -07:00
Joao Duarte
39976a3c5c Prevents event.sprintf from converting floats to sci notation
This allows sprintf to correctly print floats up to 15 decimal
places, which should be enough for most. Without this, very big
or very small floats will be converted to scientific notation.

closes #1670
2014-09-05 17:07:14 +01:00
Suyog Rao
4683e51e4b Merge @joekiller's Kafka plugin to logstash-core
Add documentation and tests
Use scala version 2.9.2 and Kafka 0.8.1.1
Closes #1472
2014-09-03 15:00:04 -07:00
Suyog Rao
06010a1764 Removed nil check
Closes #1661
2014-09-03 13:52:38 -07:00
John Pariseau
c327896b62 Change credentials default to [], use empty array
closes /elasticsearch/logstash/#1619
2014-09-03 13:17:41 -07:00
Paul Fletcher-Hill
73e52b2465 Dynamic include_keys and exclude_keys for kv filter
Closes #1618
2014-09-02 18:37:47 -07:00
Fredrik Gustafsson
2efad5bffe prevent overwrite of event host field
Closes #1668
2014-09-02 17:04:10 -07:00
wiibaa
3efce866c9 filter/date fix locale config
Closes #1664
2014-08-29 17:20:54 -07:00
Richard Pijnenburg
f5b4f0da79 Add Plugin manager to Logstash
The plugin manager allows users to install, uninstall, update and list plugins for logstash
2014-08-29 22:02:07 +00:00
wiibaa
3096aeca10 fix rebase
Closes #769
2014-08-29 12:21:05 -07:00
Wiibaa
18049e138d Support almost-ISO8601 patterns in date filter ISO8601 config 2014-08-29 12:20:41 -07:00
Jordan Sissel
dafb3f1478 Merge pull request #1665 from mfournier/LOGSTASH-1886-2nd_try
LOGSTASH-1886: intercept exception raised by march_hare
2014-08-28 12:59:37 -07:00
Suyog Rao
0aaf8c6874 Clean up code
Closes #1657
2014-08-27 13:20:57 -07:00
Suyog Rao
d7bb4df9bf More fixes to use new grok lib 2014-08-27 13:20:48 -07:00
wiibaa
8351fbd401 filter/mutate raise configError in register
Closes #1656
2014-08-27 11:30:49 -07:00
Suyog Rao
2f12d38ae9 Merge branch 'pr/1593' 2014-08-26 14:40:13 -07:00
Suyog Rao
a764ed956e Added more tests without the need for live syslog input
Closes #1593
2014-08-26 14:38:37 -07:00
Marc Fournier
abe6bdbbd8 LOGSTASH-1886: intercept exception raised by march_hare
Since ae867bc64, the march_hare version we use raises an error when the
network link is broken while the socket is idle. This case must be
handled by logstash to initiate the reconnection process.
2014-08-26 11:59:26 +02:00
Jordan Sissel
ab60853b4b Merge pull request #1591 from yummylogs/master
Issue #1590 Multiline filter and additional worker threads do not work together.
2014-08-22 16:19:25 -07:00
Jordan Sissel
40eff426eb Merge pull request #1607 from Fewbytes/LOGSTASH-2276
LOGSTASH-2276 fixed if/else branch mixup in rabbitmq input
2014-08-22 16:15:35 -07:00
Jordan Sissel
f460507ec3 Merge pull request #1625 from khouse/master
Add sprintf ability to room_id field in hipchat output
2014-08-22 16:07:47 -07:00
Jordan Sissel
dbe6b33d10 Update version 1.5.0.dev 2014-08-21 14:51:21 +00:00
Kyle House
cf9844dcbd Add sprintf ability to room_id field in hipchat output 2014-08-11 16:19:20 -05:00
Avishai Ish-Shalom
409dc8c366 LOGSTASH-2276 fixed if/else branch mixup in rabbitmq input 2014-08-07 09:07:06 +03:00
Simon Mulser
bdd69065a4 add unique tag for grok parser in module input 2014-08-04 00:21:48 +02:00
yummylogs
e9e3ad5a50 Update multiline.rb 2014-08-01 12:20:03 -07:00