Parsing a variable length log


(Sean) #1

Hi,

Sorry is this if too obvious, but I feel like I have been browsing through all of google now :slight_smile:

I have a log, where I can't seem to figure out any patterns.

I need the location from that line, but the message can differ quite alot.
example.

NEW YORK APG2 - MLK
NEW YORK APG1 - MLK
NEW YORK APG2
Pittsburgh APG2 - MLK
Pittsburgh PSDS1
Pittsburgh

Well, I only need the location name, and not the APG og MLK etc.

Can anyone help please. thanks


(Magnus Bรคck) #2

This is trivial with a grok filter if you can define the unique characteristics of the APG/MLK strings. For example, are they always uppercase and digits? And no place names end in that way?


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.