![]() Returns the log events 3 lines before and after the line which included the term "example". grep Command Line: grep -B 3 -i "example".While there is no query language equivalent operation, you can search surrounding messages. Returns the log events 3 lines before the line which included the term "example". Sumo Equivalent: No equivalent operation.grep Command Line: grep -A 3 -i "example".Returns the log events 3 lines after the line which included the term "example". Sumo Equivalent: _sourceName=*/log_file AND " string ".Sumo Equivalent: _sourceName=*/log_file | parse regex "(start.*end)" | fields - sampleįinds all words which match the term "string" in a file named "log_file".Using regex, returns all events where a particular pattern is present on the log line. Sumo Equivalent: _sourceName=*/log_file AND "literal_string" | parse regex "(?literal_string)" | fields - sample.grep Command Line: grep "literal_string".Returns all log lines containing the term "literal_string" (case sensitive) in a file named log_file. Sumo Equivalent: _sourceName=*/log_* AND "string".Returns all log lines containing the word "string" (case insensitive) in a file that starts with "log_" in its name. Sumo Equivalent: _sourceName=*/log_file AND "string".Returns all log lines containing the term "string" (case insensitive) in a file named log_file. Sumo Equivalent: _sourceName=*/log_file.In Sumo, you must paginate through the results, but you can also search for ALL log files across your stack which share the same name. ![]() Returns the contents of a file named log_file for a specific timeframe. ![]() You should still follow the seven search rules to live by. We recommend that search your data using the _sourceCategory metadata tag, but you’ll see that the examples below use the _sourceName metadata tag because _sourceName should reflect the full canonical path of the file, which is typically what you use when greping files. Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.Remember that Sumo Logic queries are time-constrained. The problem solvers who create careers with code. LinkedIn YouTube Facebook Twitter Products Easily learn new technologies and coding concepts and quickly find the answers you need. With Red Hat Developer cheat sheets, you get essential information right at your fingertips so you can work faster and smarter.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |