graylog2-web-interface icon indicating copy to clipboard operation
graylog2-web-interface copied to clipboard

Show surrounding messages

Open lennartkoopmann opened this issue 13 years ago • 26 comments

Have a dropdown on the search result pages: "Show X [hours/minutes/seconds] of surrounding messages".

lennartkoopmann avatar Jul 24 '13 19:07 lennartkoopmann

The default value could be a per stream configuration option, as well as a global option per user. In the sense that the values would cascade, to provide the most intuitive interface for each use case. I assume this would apply to various other options as well.

Think about how the intentions when looking at application logs with stack traces is much different to say looking at http access logs.

kroepke avatar Jul 25 '13 08:07 kroepke

I'm running graylog2 to gather logs from a cluster of multiple load-balanced weblogic servers.

Currently, when I search for messages, I want to be able to see surrounding log entries. I can only see the lines with messages I search for (which is the intended search functionality).

I want to add functionality to be able to search for a message then click a button to see 20 (configurable number limit) lines before and after the message. Or possibly 5 minutes (again, configurable time limit) before and after the message.

Also, maybe I could have a tag from the specific server to filter by server that sent the message.

growabeard avatar Aug 07 '13 15:08 growabeard

This was closed but it doesn't seem like it was implemented. Am I missing something about how to do this? I'm running 0.20.1.

bvenable avatar Mar 05 '14 21:03 bvenable

This issue is not closed. The referenced issue #302 was closed.

lennartkoopmann avatar Mar 06 '14 12:03 lennartkoopmann

#755 is related.

kroepke avatar Jun 03 '14 13:06 kroepke

If my search result shows me 10 events, where surrounding messages will be? Before/after each event or before/after event set?

timukas avatar Jun 03 '14 14:06 timukas

+1 I need this for apache error logs which often span over several rows, so If I find one row of the error, I want to easily show the lines both before and after this. Also by assigning filter like only from that specific path variable.

kiranos avatar Dec 18 '14 20:12 kiranos

@kiranos You could use mod_unique_id to generate a unique ID for each request and add an extractor to your Graylog2 input which extracts that information into an additional field which you can query.

joschi avatar Dec 19 '14 09:12 joschi

+1 I miss the grep -A num and -B feature

     -A num, --after-context=num
             Print num lines of trailing context after each match.  See also the -B and -C options.

     -B num, --before-context=num
             Print num lines of leading context before each match.  See also the -A and -C options.

d0x avatar Feb 11 '15 22:02 d0x

When do you expect this issue be closed? Thanks

tarekz avatar Mar 02 '15 17:03 tarekz

I agree with @d0x this would be a really useful feature

eorochena avatar Mar 24 '15 16:03 eorochena

I would like to +1 d0x on this request as well. I have logs to review to troubleshoot issues with JSON. When I search for "INVALID JSON STRING" in the error message, I need to see the line before to examine the string to resolve the issue. grep -B 1 INVALID filename is perfect for this since all of the entries are on the same screen if there are multiple incidents. I could use the datetime to show lines around the entry to see the action but if I have 6 or 7 to resolve, I have to note the datetime and do the search that many times.

dbprism avatar Apr 09 '15 19:04 dbprism

+1 here as well. I have set up streams with only ERRORs, and when the devs check the dahboard, they need to see the lines before the error. Would be very useful. Thanks.

menduraa avatar Apr 16 '15 11:04 menduraa

+1

sataman avatar Apr 17 '15 17:04 sataman

+1

caseyhoward avatar Apr 23 '15 20:04 caseyhoward

+1

andrewlague avatar Apr 23 '15 20:04 andrewlague

+1

Lead here by link that said it would be in v0.20 in Jan 2014. http://grokbase.com/t/gg/graylog2/13c3dp4j42/context-in-quick-filter-searches-like-grep-c-10-mysearch-mylog-log-in-grep

sheavner avatar May 01 '15 04:05 sheavner

Just to add a UI suggestion for this from https://groups.google.com/forum/#!topic/graylog2/Kvg7yfVn_po , the 'time' portion of the search specification form could be enhanced to have a third option: "relative to time". (The existing to are "relative to now" and "absolute".) This option would allow specifying an absolute time point and then relative windows backward and forward (either with sliders or dropdowns). Then a button could be added to the message detail panel (or even the results table row) "Show surrounding messages" which simply prefills that "relative to time" part of the search form.

arobertn avatar May 29 '15 09:05 arobertn

Why you can not implement this really useful simple feature since 2013? You have completely rewrite web UI in new version, but you are not able to add simple button with small JavaScript logic.

rumatoest avatar Jun 09 '15 07:06 rumatoest

@rumatoest as usual, PRs are welcome :)

edmundoa avatar Jun 09 '15 08:06 edmundoa