-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logstash Filebeat module #5481
Logstash Filebeat module #5481
Conversation
If you want to use Logstash's slowlog you have to turn it on in the configuration with something like this. slowlog.threshold.warn: 2s
slowlog.threshold.info: 1s
slowlog.threshold.debug: 500ms
slowlog.threshold.trace: 100ms You can use a sleep filter to actually get something slow :)
|
6064413
to
08b7cd2
Compare
{INSERT IMAGE AFTER REVIEW} | ||
|
||
[float] | ||
=== Log fileset settings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part of the docs is being refactored in #5341. It might make sense to update it already to the new style of module documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the pointer! I will do that.
], | ||
"processors": [ | ||
{ | ||
"json": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The JSON decoding could also be done on the Filebeat side, but I'm not sure if there's any advantage to that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My reasoning was, It's easier to to all the transformation at the same place, easier to tests/debug.
- c:/programdata/logstash/logs/logstash-slowlog-plain*.log | ||
- c:/programdata/logstash/logs/logstash-slowlogjson*.log | ||
|
||
ingest_pipeline: ingest/pipeline-{{.format}}.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 👍
# Filebeat will choose the paths depending on your OS. | ||
#var.paths: | ||
|
||
# Slow logs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a bit strange that we call it slow logs in the comments but below it's error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops, typo good catch :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will do another complete run, are you volunteering to test it? 💃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can do, but probably only get to it tomorrow.
62ed562
to
b657b71
Compare
I have updated the PR, generating a bit more dummy data to create a dash board. |
410ed29
to
069addd
Compare
@tsg Can you take a look at it? |
I didn't see in the PR a |
re: modules.yml I might have followed an older doc, will add it easily, also checking for tests. |
069addd
to
3600ba4
Compare
fixing pep8.. ;) |
b77bc11
to
5966b9c
Compare
633054c
to
456b0eb
Compare
@ph there seems to be still one more error:
|
This module add support for the differents logs files generated by Logstash and add simple dashboard to display relevent information. Depending on the configuration Logstash will generate two differents log: 1.`logstash-(plain|json).log`: this log file will contains all the normal log events generated by logstash. 2. `logstash-slowlog-(plain|json).log`: This log will contains events generated when the slow log feature is enabled in logstash and will contains the name of the plugin and the execution time. The recording of theses events are based on configurable threshold. Also Logstash will output by default plain text log events but user can change that to export structured JSON logs.
b774d97
to
55252c6
Compare
This module add support for the differents logs files generated by
Logstash and add simple dashboard to display relevent information.
Depending on the configuration Logstash will generate two differents
log:
1.
logstash-(plain|json).log
: this log file will contains all thenormal log events generated by logstash.
logstash-slowlog-(plain|json).log
: This log will contains eventsgenerated when the slow log feature is enabled in logstash and will contains
the name of the plugin and the execution time. The recording of theses
events are based on configurable threshold.
Also Logstash will output by default plain text log events but user can
change that to export structured JSON logs.
TODO