The old version (1.0.0) had a broken version of Concurrent::Timer that
did not work on all machines for reasons that are still unclear, but may
be related to the Java version
Fixes#7368
With the merge of https://github.com/elastic/logstash/pull/7284, Logstash
now depends on elasticsearch client to setup modules.
To be usable under jruby we also need to depends on manticore, this
problem is only show when try to use the logstash-core gem directly and
not in the Logstash project since it bundle the elasticsearch output
with the manticore dependency.
* My changes (#7218)
* First upstream PR commit (#7172)
No tests yet. Just for code review for now
* move all inner classes to their own folder + client and importer
* Fixes and tests (#7228)
Add tests for the `LogStash::Modules:CLIParser` class in `cli_parser.rb`
Fix a typo in `cli_parser.rb` (`uparsed` vs `unparsed`)
Fix a bad variable name found by testing in `cli_parser.rb` and update the error message accordingly in `en.yml`
* Remove fb_modules (#7280)
* fixes to import index-pattern & var updates & savedsearch capability (#7283)
* fixes to import index-pattern & var updates & savedsearch capability
fixes to import index-pattern & var updates
add savedsearch capability
* minimise merge conflicts with PR End-to-End test with filebeat apache2
* End-to-End test with filebeat apache2 (#7279)
This is a first run, but data flows from filebeat through Elasticsearch.
Template uploads from `$LS_HOME/modules/MODULENAME/configuration/elasticsearch/MODULENAME.json`
Specifying `--modules filebeat` from the command-line, with `-M "filebeat.var.elasticsearch.output.host=localhost:9200"`
Some of the saved searches don't get uploaded. @guyboertje is on this already.
The logstash configuration needs tweaking to allow receiving both access logs _and_ error logs. The dashboards and visualizations all seem to expect the presence of both.
Set default to `localhost` in `elasticsearch_client.rb`
Changed command-line variable parsing to allow for a variable with only `modulename.key.subkey=value`, and updated the error message accordingly.
First draft of the filebeat module, as extracted from filebeat 5.4.0
* Add documentation for Modules
This is specific to the Master branch. Multiple modules will not be supported in 5.5.
* Add READMEs and prune post-code comments
* Add comment regarding the variable name `modul`
Also, fix the default username for the Elasticsearch output in Logstash. The default x-pack credentials are `elastic:changeme` rather than `elasticsearch:changeme`
* add cef module files (#7292)
* fixes from reviews of PR #7284
Ruby 2.0's stdlib no longer allows relative IPv6 URLs like: //[::1]
This is a key feature of the Elasticsearch output. See more in
https://github.com/logstash-plugins/logstash-output-elasticsearch/issues/604
The only way to fix this is to use a better URI class which means
introducing a slight incompatibility here. I don't believe that anyone
is using the URI class other than the ES output, and I don't that there
is anyone using any portions of the API here that are no longer
compatible.
Normally we would only make such a change in a major version, but our
hands are tied here. If we are to go with JRuby 9k, which is critical
for support we must use a different, better, library.
java.net.URI is stable and works well, so its probably superior in the
long run anyway.
Fixes#7236
Remove static method in ByteBufferPageIO, replacing with static test helper method to move
the required functionality to a single place.
Cleans up HeadPageTest, using try... with resources in place of explicit, and
potentially missed, close() calls.
Adds elastic/securemock mocking framework dependency
Resolves#6594Fixes#7268
* add multi_local source for multi pipelines
* introduce pipelines.yml
* introduce PipelineSettings class
* support reloading of pipeline parameters
* fix pipeline api call for _node/pipelines
* inform user pipelines.yml is ignored if -e or -f is enabled
Fixes#7230
Further improves on the threadsafety improvements in #7206
This commit fixes various tests to access the Agent#pipelines property
in a fully threadsafe way.
Fixes#7233
Universal plugins may access the #pipelines property of the agent.
This PR makes accessing it in a threadsafe way possible with a
`with_pipelines` helper function in Agent.
This uses a reentrant lock since its anticipated that users may want to
nest calls here. A ruby Mutex is not reentrant, so that won't work.
Fixes#7206
We remove a flaky test "LogStash::Agent#execute when auto_reload is true if state is clean should periodically reload_state"
in favor of the refactored test in `converge_spec`, since it doesn't use
rspec mock but instead use a threadsafe spies to make sure we do
multiple call on the source loader.
Fixes: #7196Fixes#7200
This change introduce a test for cross-process/jvm file locking
using the FileLockFactory class. It uses a client program that
will lock a file aftwards the test case proceed.
Fixes#6610Fixes#7117
Java code is mostly the same as that from the JRMonitor gem with some general tidying and DRYing up
Report classes are now straight Java
Added junit tests for the Java monitor classes
Ruby code basically stays the same, other than calling out to pure Java report classes
Fixes#7167
When running this test with a newer version of rspec we got the warning
that some values where leaking between example:
```
1) LogStash::ShutdownWatcher when pipeline is not stalled .unsafe_shutdown = false shouldn't force the shutdown
Failure/Error: m.call(*args)
The use of doubles or partial doubles from rspec-mocks outside of the per-test lifecycle is not supported.
# ./logstash-core/lib/logstash/shutdown_watcher.rb:67:in `pipeline_report_snapshot'
# ./logstash-core/spec/logstash/shutdown_watcher_spec.rb:22:in `block in /Users/ph/es/second/logstash/logstash-core/spec/logstash/shutdown_watcher_spec.rb'
# ./logstash-core/lib/logstash/shutdown_watcher.rb:44:in `block in start'
# ./vendor/bundle/jruby/2.3.0/gems/stud-0.0.22/lib/stud/interval.rb:20:in `interval'
# ./logstash-core/lib/logstash/shutdown_watcher.rb:42:in `start'
# ./logstash-core/spec/logstash/shutdown_watcher_spec.rb:93:in `block in (root)'
```
We have added a few helpers method in the class that allowed us to
simplify the expectation and removed any usage of `Thread#kill`
Fixes#7152