Commit graph

3725 commits

Author SHA1 Message Date
Tal Levy
c3bab9d896 add support for :bytes validation to config
Fixes #2321
2015-01-15 19:53:31 +00:00
Pier-Hugues Pellerin
ce331957fa obj -> other
Fixes #2331
2015-01-14 23:46:00 +00:00
Pier-Hugues Pellerin
85fd55eac5 cosmetic change
Fixes #2331
2015-01-14 23:46:00 +00:00
Pier-Hugues Pellerin
938dbfca77 Refactoring of the version check using comparable
Fixes #2331
2015-01-14 23:46:00 +00:00
Pier-Hugues Pellerin
4d7549f5f7 create a class to hold the plugin version
Fixes #2331
2015-01-14 23:46:00 +00:00
Pier-Hugues Pellerin
7f0b70aaba Code review comments
Fixes #2331
2015-01-14 23:46:00 +00:00
Pier-Hugues Pellerin
49f03efc19 adding a test for deprecating the milestone method
Fixes #2331
2015-01-14 23:46:00 +00:00
Pier-Hugues Pellerin
ecb568e740 Okay fetch the current logger
Fixes #2331
2015-01-14 23:46:00 +00:00
Pier-Hugues Pellerin
f340a359ef Use the gem specification from the plugin to display the version notice to the user
Fixes #2331
2015-01-14 23:46:00 +00:00
wiibaa
d86797dea9 harmonized event filtering by type/tags in filter and output + correct logging
Fixes #2339
2015-01-12 18:17:44 +00:00
Vincent Bernat
19bfe8c14a output: fix use of exclude_tags in output plugins
For people still using `exclude_tags` in their output configuration,
Logstash stops with an exception `TypeError: can't convert nil into
String`. Fix that by fixing the reference to `@exclude_tags`.

Fixes #2323
2015-01-08 17:57:27 +00:00
Colin Surprenant
e34aee2bff Plugin#lookup refactor to resolve plugin classes in the namespace, added plugin spec and filter base class spec
refactor Plugin#lookup to resolve existing plugin class in the namespace but not in the plugins path

ex noop filter specs refactored into a filter base_spec

reverted locales/en.yml changes

plugin lookup logic refactor

fix the new spec_helper location

check if class in a LogStash::Plugin

add debug log

typo

test for plugin class and config_name method

replaced :file with :path

use Class.new and cosmetic changes

Fixes #2095
2015-01-06 20:01:20 +00:00
Richard Pijnenburg
569866e312 Move vendor part to file-dependencies gem
Fixes #2245
2015-01-06 13:03:49 +00:00
Tal Levy
b7ba48d393 update accessors#get does not mutate @store
This fixes Accessors so that when one `get`s a
field reference, it does not inject an empty path
into the original store

before, there were side-effects:
data = {}
a = LogStash::Util::Accessors.new(data)
a.get("[hello][world]")
//(data mutates) data == {"hello" => {}}

Fixes #2294
2014-12-30 09:22:59 +00:00
Tal Levy
d6cb066e03 update pipeline to call teardown of output workers when :workers > 1
Fixes #2180
2014-12-26 12:41:51 +00:00
wiibaa
ea7db02836 validate config file encoding when containing non-ascii characters
Fixes #1468
2014-12-23 19:46:15 +00:00
Colin Surprenant
87a9e42f34 removed unused code
Fixes #2203
2014-12-10 23:48:17 +00:00
Colin Surprenant
9ad3384377 removed coveralls dev dependency, more .bundle dir cleanup, install without parameter fix
Fixes #2203
2014-12-10 23:48:17 +00:00
Colin Surprenant
20393d8ed5 correclty reset bundler, disabled multiple jobs, removed .done file stuff
Fixes #2203
2014-12-10 23:48:17 +00:00
Colin Surprenant
aa70b40862 refactor to use single gem dir vendor/bundle, use Bundler::CLI, .lock files naming
Fixes #2203
2014-12-10 23:48:17 +00:00
Colin Surprenant
288cb1fc05 gem paths settings fix & refactor
Fixes #2203
2014-12-10 23:48:17 +00:00
Pier-Hugues Pellerin
00899fc411 Adding bootstrap gem to the gem home
Fixes #2203
2014-12-10 23:48:16 +00:00
Colin Surprenant
cce702e4d3 timestamp.to_iso8601 works for all platforms and faster than time format parsing
Fixes #2179
2014-12-06 00:35:54 +00:00
Colin Surprenant
3c7fb7b9bc short circuit simple json string generation and memoize iso8601 string
Fixes #2179
2014-12-06 00:35:54 +00:00
Bernd
554f6852d3 Avoid static file corruption (small.png) on Windows
When using `logstash web` on Windows the Kibana Logo on the dashboard is broken. This is because it will return small.png with 479 instead of 480 bytes (removing a 0x0d).

Fixes #1796
2014-12-02 05:57:29 +00:00
Joao Duarte
9dbd52583b codec#on_event api change
Fixes #2140
2014-12-02 05:53:25 +00:00
Joao Duarte
052bf6e1ab fix gem_home setting in environment.rb
Fixes #2107
2014-12-01 19:37:57 +00:00
Colin Surprenant
1a095fccb9 fix removing field with reference to array items & specs
Fixes #1990
2014-11-18 19:19:04 +00:00
Tal Levy
df67763f43 Merge pull request #2051 from talevy/fix/1401
Fix for handling accessor sets on array elements.
2014-11-17 14:07:39 -08:00
Richard Pijnenburg
1748f2c5fb Use detect call to simplify it after review
Fixes #2063
2014-11-15 19:47:00 +00:00
Richard Pijnenburg
ab71a674ba Modify the way we fetch the installed version of the plugin
Fixes #2025

Fixes #2063
2014-11-15 19:46:59 +00:00
Tal Levy
dd3667e08f Fix for handling accessor sets on array elements.
Previously: Filters like mutate would throw an exception when attempting
to convert an element within an array to a specific type. This was
raising an error because the index in the field reference was being
treated as a String instead of an integer representing the index of the
field to convert.

Now: Plugins like Mutate can access and convert elements within arrays
to specific types, or, updating their values.
2014-11-13 08:34:41 -08:00
Pier-Hugues Pellerin
d2bf28bd40 style preference
Fixes #2061
2014-11-12 20:30:26 +00:00
Pier-Hugues Pellerin
9af51505b6 Allow unary operators and comparable on timestamp object closes #2052
Fixes #2061
2014-11-12 20:30:26 +00:00
Jordan Sissel
fd621fe3d1 Accept file and http URI in the -f flag.
This patch was slightly modified to make it merge correctly against
master
(original patch by @jsvd is #1873)

Closes #1873
2014-11-11 00:19:35 +00:00
Richard Pijnenburg
8be99c4302 Force the uninstall of a plugin at install or update time.
It can happen we want to update a plugin that is a dependency for an other plugin
which will result in a warning and a manual action at uninstall phase of the install/update tasks
Since we are 100% sure in these cases that the plugin will be installed again we can force the uninstall part
not to alert us about it.

This solves the issue we otherwise would get:

Gem::DependencyRemovalException: Uninstallation aborted due to dependent gem(s)

Fixes #2034
2014-11-09 11:13:15 +00:00
Suyog Rao
3b647dca6b Fix formatting for word plain
Fixes #2038
2014-11-07 22:35:20 +00:00
Suyog Rao
c3f2f94cad More asciidoc fixes for base input and output
Fixes #2038
2014-11-07 22:35:20 +00:00
Suyog Rao
25aa771643 Fix asciidoc formatting of the base config options
Fixes #2035
2014-11-07 18:47:39 +00:00
Richard Pijnenburg
1381c06858 Update after review
Fixes #2029
2014-11-05 23:52:26 +00:00
Richard Pijnenburg
4f46ab33cc Move most common functions away into a util method
Fixes #2029
2014-11-05 23:52:26 +00:00
Richard Pijnenburg
571ca87163 Adding option to download remote files as part of the gem
- Adding minitar as dependency
- Adding vendor file to handle the tasks
- Adding vendor hook to install and update actions

the vendor.json file should be placed at the root of the gem file
This file defines all the remote sources that should be downloaded.
The content of it is an array of hashes.
Each hash has the following settings:
- url
- sha1
- files

url is the url of the remote source
sha1 is the sha1 fingerprint we use for validation of the downloaded file
files can have different settings and is only used for .tar.gz / .tgz files
not setting it extracts the whole tar.gz file
An array of files allows to extract specific files
A Regexp allows extracting specific files

Fixes #2029
2014-11-05 23:52:26 +00:00
Suyog Rao
375a225ec3 Fix typo in install
Fixes #2019
2014-11-05 03:19:47 +00:00
Richard Pijnenburg
f472d4af24 Cleanup plugins to move to plugin system
Plugins have moved to https://github.com/logstash-plugins/... into
individual repositories. One plugin per repo.

* Add plugin install task and add required plugins for testing
* Adding a plugin task to install plugins
* Added required plugins to a prep task for the test part.

Fixes #1984
2014-11-04 23:24:59 +00:00
Richard Pijnenburg
eb0b218c8c Use returns instead of exit
Need to return the exit code and let the runner app perform the exit

Fixes #1838
2014-11-04 19:06:04 +00:00
Richard Pijnenburg
56eb71ca1f Some documentation generation fixes
- Add docgen command to use internal libraries
- Fix loading of base files due to plugin path changes
- Fix loading of jar dependency files
- Remove kramdown gem and actions
- Cleanup the generated synopsis a bit

Fixes #2009
2014-11-03 20:23:39 +00:00
Scott Wilkerson
f5aacc032e TCP input host field contains source port
Fixes LOGSTASH-1849
https://logstash.jira.com/browse/LOGSTASH-1849

Fixes #1649
2014-10-24 21:44:35 +00:00
Jordan Sissel
920a9e9362 Refactor build tooling to use Ruby
The new way to build is using 'rake' and not 'make'.

For some some attempt at compatibility, any 'make' invocation will
invoke rake. `make foo` will invoke `rake foo`.

This is for #1640

Major changes:
* rake is used instead of make. This allows us to more easily improve,
  debug, and test the build tooling.
* The build process can be bootstrapped from any Ruby that has
  Rake available. Bootstrapping rake is automatic will download JRuby and
  re-execute itself under JRuby.
* rpm and deb packages no longer list any java as dependencies. This
  is the result of user discomfort and discussions which concluded
  that there is no good way to "depend" on Java via rpm or deb.

Internal changes:
* Vendoring paths are project-based. Each vendor directory is now
  specific as vendor/<project>/... For example, JRuby is dumped into
  vendor/jruby/...

Other changes:

* We don't use jruby-complete anymore. We now use bin/jruby as the entry point.
  This improves the startup time of Logstash on my laptop by approximately
  1.5 seconds (~25% speedup of startup time). Testing `bin/logstash
  version` speed; 5 runs each:

  * Before patch: 7.27 7.55 7.26 7.42 7.47
  * After patch: 5.54 5.97 5.67 5.58 5.54

Smaller changes:
- removed 'env' subcommand
- Remove 'deps' subcommand. Replaced by 'rake vendor:all'
- Add gem_home method for this platform's GEM_HOME
- .travis.yml removed because we haven't used Travis in a long time.
- bin/logstash exits nonzero with a useful message if JRuby can't be found.

Notes:

Invoke bundler via system() call instead of Bundler::CLI.
After some discussion in #bundler on freenode (very helpful!) on how
to do what we need to do with bundler, I was encouraged to not use the
bundler api from ruby, so system() it is.

Patch slightly modified to fit the new model of packaging (ruby instead
of shell invocation), but original author is obazoud in #1008.

Richard Pijnenburg helped with some of the code and was lovely in
helping test it.

Fixes #1640
2014-10-22 17:04:55 +00:00
Jordan Sissel
a843d25f97 Fix metadata testing failures
This bug was introduced in the recent metadata patch. The problem was
caused by a testing-specific monkeypatch on LogStash::Event#[]=

I fixed this by moving the strict_set input validation from
LogStash::Util::Accessors to LogStash::Event as a class method.
Then monkeypatched the Event#[]=  to invoke validation before doing
the set operation. This now makes it call the original []= method
and should help keep future breakages from happening.

Fixes #1936
2014-10-22 16:50:58 +00:00
Jordan Sissel
ed29302842 Bump to 2.0.0.dev 2014-10-15 16:01:56 +00:00