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 to HIST the ability to display the number of matches based on arbitrary patterns #1253

Open
maxim-lbmv opened this issue Apr 5, 2024 · 1 comment
Labels
enhancement Feature Request

Comments

@maxim-lbmv
Copy link

To analyze the relationships between errors, you need to view the sequence of their occurrence. This problem can be easily solved using graphs that display the number of messages per unit of time. If you combine several of these graphs, you can clearly see that after a certain error, another always follows. Or that after a certain number of warnings in one of the applications, an error occurs in the other.

In the lnav application, this function is already implemented in the form of HIST but for fixed templates. If you add the ability to add custom templates, log analysis will become much easier.

Custom templates can also include numeric value captures to plot, for example, RAM usage or other parameters, which would also be useful for tracking down the cause of errors.

In the pictures there is an example from your data; in real data, of course, everything is much clearer.

lnav
lnav2

@maxim-lbmv maxim-lbmv added the enhancement Feature Request label Apr 5, 2024
@tstack
Copy link
Owner

tstack commented Apr 5, 2024

This is technically possible right now using a DB query, but it's a hassle:

;select tslice, tslice, json_group_object(cs_method, total) from (SELECT cs_method, timeslice(log_time_msecs, '5m') as tslice, count(*) as total from access_log group by tslice, cs_method) group by tslice
image

I added support for PRQL in the last release, which should make it possible to simplify this query quite a bit. I'll add something for that in the upcoming patch release.

tstack added a commit that referenced this issue Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature Request
Projects
None yet
Development

No branches or pull requests

2 participants