Commit graph

7141 commits

Author SHA1 Message Date
Joao Duarte
e2870cac07 fix --config-test and add tests for it
fixes #4933

Fixes #4944
2016-03-31 21:00:39 +00:00
Pere Urbon-Bayes
20087cc2a6 fix commands still using bin/plugin and not the new logstash-plugin so feedback to users when errors happen got strange
Fixes #4945
2016-03-31 13:40:13 +00:00
Joao Duarte
51874b88d1 fix race condition in agent spec
Fixes #4912
2016-03-29 15:52:15 +01:00
Pere Urbon-Bayes
8c746cda49 Make the logstash-core-plugin-api install locally in case of having a :path in the Gemfile, works the same way as other "core" gems used for master branch.
Fixes #4908
2016-03-29 13:47:17 +00:00
Colin Surprenant
48cda5dc2c support RubyBignum in Javafier
cosmetics
2016-03-28 18:35:20 -04:00
Andrew Cholakian
a8d5177f8b Revert to use only a single worker by default on outputs
The move to auto-scale output workers was great in theory, but a lot of outputs
just weren't built to support it well, they often used too many resources or had
logical errors.

Fixes #4905
2016-03-28 18:34:20 +00:00
Joao Duarte
6cf8846686 remove node_name cli argument
this argument is not used and was introduced by mistake in
the backport of the automatic configuration reloading

Fixes #4850
2016-03-24 21:13:29 +00:00
Andrew Cholakian
a088de13a2 Fix threadsafe workers in output delegators to not instantiate extras Cherry pick of db9e67802fb1f6cd097bcac0a7aa59a3a453ceb1 from master Originally from https://github.com/elastic/logstash/pull/4763
Fixes #4894
2016-03-24 21:11:53 +00:00
Joao Duarte
69813c0f29 prevent reloading of configurations containing non reloadable plugins
Fixes #4893
2016-03-24 20:55:52 +00:00
Pere Urbon-Bayes
799b06d1e4 make available the new bin/logstash-plugin command that will be used in the feature releases of LS
Fixes #4891
2016-03-24 17:20:40 +00:00
Pere Urbon-Bayes
d98f7d946c add deprecation notice to bin/plugin command
Fixes #4891
2016-03-24 17:20:39 +00:00
DeDe Morton
352e8d9cfc Fix broken link
Fixes #4885
2016-03-24 05:53:12 +00:00
Pier-Hugues Pellerin
219d213d1a Create a virtual gem to handler the plugin dependency on core
We have decided to create a gem that the plugins can depend on to make
sure they use the correct core, with that in mind this will reduce the
mass update required when releasing a major release of logstash if the
contract between logstash and the plugin didnt change. The first version
of this gem act as a virtual gem, future release will include the actual
plugins code of the contract.

This gem should follow the same convention as semver, a breaking change
in the api will mean a bump in the major version.  Plugins author are
encouraged to test their plugins with a specific version of the contract
and define their dependency as the following:

```
  s.add_runtime_dependency "logstash-core-plugin-api", "~> 2.0"
```

This PR also introduce rake task to help managing this gem, since every
release of logstash will produce a new version of this gem with the
minor version bump. A **logstash-core-plugin-api** will declare a strict
dependency on a specific **logstash-core** version, like this:

```
  s.add_runtime_dependency "logstash-core", "2.3.0"
```

On the other hand each release of logtash will also declare a strict
dependency on a specific version of the `logstash-core-plugin-api` gem.

ref #4829

Fixes #4881
2016-03-23 20:23:54 +00:00
Joao Duarte
62720bcd22 fix reload_state spec to ensure pipeline has started
Fixes #4855
2016-03-21 16:19:03 +00:00
DeDe Morton
2e740c6363 Add docs for auto config reloading
Fixes #4847
2016-03-21 06:35:37 +00:00
Joe Einertson
93bb69a7c2 Clarify basic instructions in getting started guide
Fixes #4835
2016-03-20 02:24:06 +00:00
Philippe Weber
3a57dc3d3f fix doc execution
Fixes #4844
2016-03-20 02:22:37 +00:00
Joao Duarte
0d63d2c47d add cli description of reload_interval
Fixes #4832
2016-03-18 20:53:20 +00:00
Joao Duarte
c23d43217a include hidden ruby-maven directory in packaging
ruby-maven ships a hidden directory called .mvn that
needs to be included in the package.
Currently the list of files to be packaged is generated using
Rake::FileList[globs] which excludes hidden files by default
(same happens with Dir.glob).

The fix is to ensure the contents of that directory are included
by explicitly referencing it.

For example, the file "extensions.xml", included in this directory,
is responsible for loading the ruby DSL for POMs. Not carrying this
file in the logstash package breaks any plugin update that uses
jar-dependencies.

Fixes #4845
2016-03-18 20:48:29 +00:00
Colin Surprenant
5d85749551 correctly handle BigDecimal Rubyfying
BigDecimal fix spec
2016-03-18 09:56:46 -04:00
Colin Surprenant
37a1f6d576 renamed newTimetsamp to newTimestamp 2016-03-17 18:56:42 -04:00
Colin Surprenant
793eb3384c return current time usec, not epoch usec, with millisec precision, support BigDecimal in Timestamp#at
return current time usec, not epoch usec, with millisec precision, because you know, Joda

correctly support BuigDecimal in Timestamp#at

specs for Timestamp#usec and Timestamp#at with all supported type

typo

more specs
2016-03-17 15:05:21 -04:00
Lucas Bremgartner
674baa7f08 Use tracer as logger
Fixes #4812
2016-03-14 15:18:41 +00:00
Lucas Bremgartner
d7de41802e Fixed typo, added missing ")"
Fixes #4812
2016-03-14 15:18:41 +00:00
Will Bradley
556fdd9445 spacing
Fixes #4732
2016-03-11 20:28:59 +00:00
Will Bradley
377e25b513 Handling undefined $KILL_ON_STOP_TIMEOUT
In cases where $KILL_ON_STOP_TIMEOUT is undefined, getting to line 99 will generate the following error:

```
/etc/init.d/logstash: line 99: [: : integer expression expected
```

I'm no shell scripting expert, but from some tinkering I landed upon changing

```
if [ "$KILL_ON_STOP_TIMEOUT" -eq 1 ] ;
```

to

```
if [[ $KILL_ON_STOP_TIMEOUT -eq 1 ]] ;
```

which appears to work for me.

Also, logstash often takes longer than 5 seconds to shut down for me, so adding a few more seconds to the countdown on line 93 might help.

Might fix https://github.com/elastic/logstash/issues/4457

Fixes #4732
2016-03-11 20:28:58 +00:00
Todd Bowles
0c98c6875e Improved the way in which JAVA_OPTS and LS_JAVA_OPTS work on windows by making it consistent with the way in which they are handled in Linux
Fixes #4758
2016-03-11 20:27:29 +00:00
Pier-Hugues Pellerin
b4c6359ba4 Use the correct output for logstash in the filebeat example
Fix #4792

Fixes #4798
2016-03-11 19:26:08 +00:00
Suyog Rao
05b58d43f7 Update STYLE.md
Fixes #4799
2016-03-11 16:49:35 +00:00
Lucas Bremgartner
1ac1e0dabd Add link to code style guidelines
Fixes #4790
2016-03-11 02:11:14 +00:00
Thomas Decaux
fb2349369a Remove duplicate text about plugins
Fixes #4773
2016-03-09 02:16:14 +00:00
fbaligand
e343d86ad0 add complementary tests to 'environment variable evaluation'
Fixes #3944
2016-03-07 11:16:57 -08:00
fbaligand
7a82fb3a4f add 'Using Environment Variables in Configuration' section in configuration documentation 2016-03-07 11:16:50 -08:00
Jordan Sissel
55d04e4301 Use structured logging. 2016-03-07 11:16:41 -08:00
Jordan Sissel
3c4b222eaf Make ${FOO} evaluation fail if FOO is not an environment variable
This updates the specs to cover this expectation. It also makes
assertions about default values if a default `${FOO:default value}` is
given.

Specs pass for me (18 specs)

(Improves on #4710)
2016-03-07 11:16:32 -08:00
Jordan Sissel
74fac6e439 Small refactor to use String#gsub and named captures for text replacements.
The config/mixin_spec.rb specs are passing for me (20 of 20 passing)

(Improves upon #4710)
2016-03-07 11:16:22 -08:00
fbaligand
93b6b6eaf9 Fix issue #3944 : Add support for environment variable injection in logstash plugin configuration 2016-03-07 11:01:54 -08:00
Joao Duarte
0099537868 support live reloading of multiple pipelines
NOTE: this is a backport from master

* reload config from files
* add reload config flag and allow reload through sighup
* move signal handling to runner
* add "-r" flag to detect changes in config and reload
* make SIGHUP reload config file
* make agent execute either loop to detect changes or sleep forever
* sigint/sigterm shut down the agent.execute task
* stop agent if pipeline terminates
* Better shutdown logic for controller and pipeline
* support multiple pipeline reloading and other cleanups
* serialize upgrade_state and running_pipelines?
* remove useless @thread from pipeline
* remove agent registry and cleanup
* reduce reload_interval from 5 to 3
* remove useless MissingAgentError class
* fix exit codes for reload_state failures
* explain why thread var exists in agent.rb
* properly pass backtrace exceptions to oops
* remove is_config_test from loader
* better documentation on agent/runner/pipeline methods

Fixes #4643
2016-03-07 11:55:57 +00:00
Suyog Rao
e9cd1682f9 Fix configtest option in init scripts
No need to export all the JAVA* related environment variables
for configtest. It needs a minimal set of variables to execute
bin/logstash --config-test. This was indirectly causing issues
when used with JMX options in LS_JAVA_OPTS. JMX needs a remote port defined
and configtest was trying to connect to the port twice which caused
restart (#4319) to fail

Fixes #4319

Fixes #4759
2016-03-04 19:04:51 +00:00
Suyog Rao
fdb959e6ae Revert #4425
#4425 introduced protection against removing `@timestamp` but there
 are a lot of tests that fail now. Reverting until we fix this properly

Fixes #4756
2016-03-03 22:53:36 +00:00
Andrew Cholakian
a44830792c Fix oops backtrace logging, it should be structured
Fixes #4724
2016-03-03 16:26:56 +00:00
Mark Walkom
9fbcb0bab8 Fixed typo in apt command
Fixes #4749
2016-03-03 01:09:25 +00:00
Lucas Bremgartner
5fe43ab0e4 Ensure that field "timestamp" is removable
Fixes #4425
2016-03-02 16:53:02 +00:00
Lucas Bremgartner
6bf6e38f59 Introduced InvalidOperationException
Fixes #4425
2016-03-02 16:53:02 +00:00
Lucas Bremgartner
e023bd4bc6 Prevent field @timestamp from being removed
Fixes #4425
2016-03-02 16:53:02 +00:00
Suyog Rao
51234a637b Add section in breaking changes
Fixes #4739
2016-02-29 20:38:13 +00:00
Suyog Rao
ca597c18ed Add section of upgrading to 2.2 Fixes #4720
Fixes #4725
2016-02-29 20:27:47 +00:00
Siddhartha Sahu
67c1b8021a Use the new LS_GC_LOG_FILE variable in init scripts
Follow up to pull request #4718

Fixes #4733
2016-02-29 19:40:27 +00:00
Aaron Mildenstein
d3db942b21 Fix order of --configtest arg
It should come before the `-f`, otherwise Logstash might bind a port and
start running, rather than only perform a configtest, then exit.

fixes 4737

Fixes #4738
2016-02-29 17:35:32 +00:00
Raphaël Flores
eb4585434f Add ignore_older option and related tip.
Add option to handle example file even if it is older than 86440s.

Fixes #4714
2016-02-26 19:31:50 +00:00