mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
- link to flatjar
This commit is contained in:
parent
2392e4080d
commit
14c52c28d2
7 changed files with 21 additions and 21 deletions
|
@ -89,20 +89,20 @@ plugin tree is. In our case, it's the current directory.
|
|||
If you use the monolith jar release of logstash, you have an additional option
|
||||
- you can include the plugin right in the jar file.
|
||||
|
||||
% jar -uf logstash-%VERSION%-monolithic.jar logstash/filters/foo.rb
|
||||
% jar -uf logstash-%VERSION%-flatjar.jar logstash/filters/foo.rb
|
||||
|
||||
# Verify it's in the right location in the jar!
|
||||
% jar tf logstash-%VERSION%-monolithic.jar | grep foo.rb
|
||||
% jar tf logstash-%VERSION%-flatjar.jar | grep foo.rb
|
||||
logstash/filters/foo.rb
|
||||
|
||||
% java -jar logstash-%VERSION%-monolithic.jar agent -f example.conf
|
||||
% java -jar logstash-%VERSION%-flatjar.jar agent -f example.conf
|
||||
|
||||
## Example running
|
||||
|
||||
In the example below, I typed in "the quick brown fox" after running the java
|
||||
command.
|
||||
|
||||
% java -jar logstash-%VERSION%-monolithic.jar agent -f example.conf
|
||||
% java -jar logstash-%VERSION%-flatjar.jar agent -f example.conf
|
||||
the quick brown fox
|
||||
2011-05-12T01:05:09.495000Z stdin://snack.home/: Hello world!
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ layout: content_right
|
|||
|
||||
<h3> general </h3>
|
||||
<ul>
|
||||
<li> <a href="https://logstash.objects.dreamhost.com/release/logstash-%VERSION%-monolithic.jar"> download logstash %VERSION% </a> </li>
|
||||
<li> <a href="https://logstash.objects.dreamhost.com/release/logstash-%VERSION%-flatjar.jar"> download logstash %VERSION% </a> </li>
|
||||
<li> <a href="flags"> command-line flags </a> </li>
|
||||
<li> <a href="configuration"> configuration file overview </a> </li>
|
||||
<li> <a href="extending"> writing your own plugins </a> </li>
|
||||
|
|
|
@ -38,7 +38,7 @@ for such things, that works for me, too.)
|
|||
|
||||
## Download It
|
||||
|
||||
[Download logstash-%VERSION%](https://logstash.objects.dreamhost.com/release/logstash-%VERSION%-monolithic.jar)
|
||||
[Download logstash-%VERSION%](https://logstash.objects.dreamhost.com/release/logstash-%VERSION%-flatjar.jar)
|
||||
|
||||
## What's next?
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ right? ;)
|
|||
|
||||
* Make sure all tests pass (make test)
|
||||
* `ruby bin/logstash test`
|
||||
* `java -jar logstash-x.y.z-monolithic.jar test`
|
||||
* `java -jar logstash-x.y.z-flatjar.jar test`
|
||||
* Update VERSION.rb
|
||||
* VERSION=$(ruby -r./VERSION -e 'puts LOGSTASH_VERSION')
|
||||
* Ensure CHANGELOG is up-to-date
|
||||
|
|
|
@ -8,7 +8,7 @@ layout: content_right
|
|||
|
||||
### Download logstash:
|
||||
|
||||
* [logstash-%VERSION%-monolithic.jar](http://logstash.objects.dreamhost.com/release/logstash-%VERSION%-monolithic.jar)
|
||||
* [logstash-%VERSION%-flatjar.jar](http://logstash.objects.dreamhost.com/release/logstash-%VERSION%-monolithic.jar)
|
||||
|
||||
### Requirements:
|
||||
|
||||
|
@ -29,7 +29,7 @@ I bake as much as possible into the single release file.
|
|||
|
||||
### Run it:
|
||||
|
||||
java -jar logstash-%VERSION%-monolithic.jar agent -f hello.conf
|
||||
java -jar logstash-%VERSION%-flatjar.jar agent -f hello.conf
|
||||
|
||||
Type stuff on standard input. Press enter. Watch what event logstash sees.
|
||||
Press ^C to kill it.
|
||||
|
@ -42,7 +42,7 @@ Press ^C to kill it.
|
|||
|
||||
### Run it:
|
||||
|
||||
java -jar logstash-%VERSION%-monolithic.jar agent -f hello-search.conf
|
||||
java -jar logstash-%VERSION%-flatjar.jar agent -f hello-search.conf
|
||||
|
||||
Same config as step 2, but now we are also writing events to ElasticSearch. Do
|
||||
a search for `*` (all):
|
||||
|
@ -57,7 +57,7 @@ The same config as step 3 is used.
|
|||
|
||||
### Run it:
|
||||
|
||||
java -jar logstash-%VERSION%-monolithic.jar agent -f hello-search.conf -- web --backend 'elasticsearch://localhost/'
|
||||
java -jar logstash-%VERSION%-flatjar.jar agent -f hello-search.conf -- web --backend 'elasticsearch://localhost/'
|
||||
|
||||
The above runs both the agent and the logstash web interface in the same
|
||||
process. Useful for simple deploys.
|
||||
|
@ -81,7 +81,7 @@ Use the ['grok'](../../filters/grok) logstash filter to parse logs.
|
|||
|
||||
### Run it
|
||||
|
||||
java -jar logstash-%VERSION%-monolithic.jar agent -f apache-parse.conf
|
||||
java -jar logstash-%VERSION%-flatjar.jar agent -f apache-parse.conf
|
||||
|
||||
Logstash will now be listening on TCP port 3333. Send an apache log message at it:
|
||||
|
||||
|
@ -100,7 +100,7 @@ Same as the previous step, but we'll output to ElasticSearch now.
|
|||
|
||||
### Run it
|
||||
|
||||
java -jar logstash-%VERSION%-monolithic.jar agent -f apache-elasticsearch.conf -- web --backend 'elasticsearch://localhost/'
|
||||
java -jar logstash-%VERSION%-flatjar.jar agent -f apache-elasticsearch.conf -- web --backend 'elasticsearch://localhost/'
|
||||
|
||||
Logstash should be all set for you now. Start feeding it logs:
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ Download the monolithic logstash release package. By 'monolithic' I mean the
|
|||
package contains all required dependencies to save you time chasing down
|
||||
requirements.
|
||||
|
||||
Follow [this link to download logstash-%VERSION%](http://logstash.objects.dreamhost.com/release/logstash-%VERSION%-monolithic.jar).
|
||||
Follow [this link to download logstash-%VERSION%](http://logstash.objects.dreamhost.com/release/logstash-%VERSION%-flatjar.jar).
|
||||
|
||||
Since we're doing a centralized configuration, you'll have two main logstash
|
||||
agent roles: a shipper and an indexer. You will ship logs from all servers via Redis and have another agent receive those messages, parse
|
||||
|
@ -99,7 +99,7 @@ As with the simple example, we're going to start simple to ensure that events ar
|
|||
|
||||
Put this in a file and call it 'shipper.conf' (or anything, really), and run:
|
||||
|
||||
java -jar logstash-%VERSION%-monolithic.jar agent -f shipper.conf
|
||||
java -jar logstash-%VERSION%-flatjar.jar agent -f shipper.conf
|
||||
|
||||
This will take anything you type into this console and display it on the console. Additionally it will save events to Redis in a `list` named after the `key` value you provided.
|
||||
|
||||
|
@ -167,7 +167,7 @@ The above configuration will attach to Redis and issue a `BLPOP` against the `lo
|
|||
|
||||
Start the indexer the same way as the agent but specifying the `indexer.conf` file:
|
||||
|
||||
`java -jar logstash-%VERSION%-monolithic.jar agent -f indexer.conf`
|
||||
`java -jar logstash-%VERSION%-flatjar.jar agent -f indexer.conf`
|
||||
|
||||
To verify that your Logstash indexer is connecting to Elasticsearch properly, you should see a message in your Elasticsearch window similar to the following:
|
||||
|
||||
|
@ -199,7 +199,7 @@ Run this on the same server as your elasticsearch server.
|
|||
To run the logstash web server, just run the jar with 'web' as the first
|
||||
argument.
|
||||
|
||||
java -jar logstash-%VERSION%-monolithic.jar web --backend elasticsearch://127.0.0.1/
|
||||
java -jar logstash-%VERSION%-flatjar.jar web --backend elasticsearch://127.0.0.1/
|
||||
|
||||
As with the indexer, you should see the Logstash web interface connection:
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ If you have problems, feel free to email the users list
|
|||
|
||||
## logstash
|
||||
|
||||
You should download the logstash 'monolithic' jar - if you haven't yet, [download it now](http://logstash.objects.dreamhost.com/release/logstash-%VERSION%-monolithic.jar). This package includes most
|
||||
You should download the logstash 'monolithic' jar - if you haven't yet, [download it now](http://logstash.objects.dreamhost.com/release/logstash-%VERSION%-flatjar.jar). This package includes most
|
||||
of the dependencies for logstash in it and helps you get started quicker.
|
||||
|
||||
The configuration of any logstash agent consists of specifying inputs, filters,
|
||||
|
@ -42,7 +42,7 @@ Here is the simplest Logstash configuration you can work with:
|
|||
|
||||
Save this to a file called `logstash-simple.conf` and run it like so:
|
||||
|
||||
java -jar logstash-%VERSION%-monolithic.jar agent -f logstash-simple.conf
|
||||
java -jar logstash-%VERSION%-flatjar.jar agent -f logstash-simple.conf
|
||||
|
||||
After a few seconds, type something in the console where you started logstash. Maybe `test`.
|
||||
You should get some output like so:
|
||||
|
@ -124,7 +124,7 @@ Obviously this is fairly useless this way. Let's add the final step and test wit
|
|||
We've already proven that events can make it into Elasticsearch. However using curl for everything is less than ideal.
|
||||
Logstash ships with a built-in web interface. It's fairly spartan but it's a good proof-of-concept. Let's restart our logstash process with an additional option:
|
||||
|
||||
java -jar logstash-%VERSION%-monolithic.jar agent -f logstash-simple.conf -- web --backend elasticsearch://localhost/
|
||||
java -jar logstash-%VERSION%-flatjar.jar agent -f logstash-simple.conf -- web --backend elasticsearch://localhost/
|
||||
|
||||
One important thing to note is that the `web --backend` option is actually its own set of commmand-line options. We're essentially starting two programs in one.
|
||||
This is worth remembering as you move to an external Elasticsearch server. The options you specify in your logstash.conf have no bearing on the web ui. It has its own options.
|
||||
|
@ -175,7 +175,7 @@ Put this in a file called "logstash-complex.conf"
|
|||
|
||||
Now run it all (again. Be sure to stop your previous Logstash tests!):
|
||||
|
||||
java -jar logstash-%VERSION%-monolithic.jar agent -f logstash-complex.conf -- web --backend elasticsearch://localhost/
|
||||
java -jar logstash-%VERSION%-flatjar.jar agent -f logstash-complex.conf -- web --backend elasticsearch://localhost/
|
||||
|
||||
Point your browser at <http://yourserver:9292> and start searching!
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue