Parse question

Comments

3 comments

  • Official comment
    Avatar
    Ryan Johnson

    Hi Chris,

    If you're only after the latency values, the easiest way to do this is by using our parse regex operator. For example:

    _sourceCategory=your/data
    | parse regex " (?<latency>\d+)$"

    This will extract any number that sits between a <space> and the end of the line.

    I hope this helps!

    Ryan Johnson
    Sumo Logic, Australia

    Comment actions Permalink
  • Avatar
    Chris Winkler

    Thank you! Works like a charm. I need to brush up on my regex skills.

    0
    Comment actions Permalink
  • Avatar
    Latimer Luis

    Ryan hit the nail on the head

    \d+ = return only consecutive digits
    $ = end of line

    I would suggest regex101.com to test your regular expressions and to get you hints on tokens you might be able to use. 

    0
    Comment actions Permalink

Please sign in to leave a comment.