Skip to content
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

Add format for RabbitMQ logs #870

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nicolasbock
Copy link
Contributor

Taken from #410 (comment)

Co-Authored-By: Adam Spiers [email protected]
Co-Authored-By: Nicolas Bock [email protected]
Signed-off-by: Nicolas Bock [email protected]

Taken from tstack#410 (comment)

Co-Authored-By: Adam Spiers <[email protected]>
Co-Authored-By: Nicolas Bock <[email protected]>
Signed-off-by: Nicolas Bock <[email protected]>
@tstack
Copy link
Owner

tstack commented Jun 11, 2021

This is marked as a Draft, is there anything else you want to do?

@nicolasbock
Copy link
Contributor Author

It's working but I wanted to give myself a bit more time with it to see if everything is in there.

Unfortunately the performance is not great. Loading a 4GiB log file takes upwards of 10 minutes. Fortunately lnav is usable before it fully loads the log.

I will test it out today a bit more and then give it 👍 or 👎 😄

"rabbitmq_log": {
"regex": {
"connection": {
"pattern" : "^=(?<level>[A-Z]+) REPORT==== (?<timestamp>\\d\\d?-\\w{3}-\\d{4}::\\d{2}:\\d{2}:\\d{2}) ===(\\n(?<body>(closing AMQP connection <(?<stuff>.+)> \\((?<sourceIP>\\d[\\d.]+\\d?):(?<sourcePort>\\d+) -> (?<destIP>\\d[\\d.]+\\d?):(?<destPort>\\d+)\\))?(.*\\n)*))?$"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if the performance issue could be mitigated by tweaking this a bit. For example changing the .+ inside <(?<stuff>.+)> to [^>]+ so that the regexp matching engine doesn't have to do any backtracking. Just a guess, not sure if it will help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants