Hi
I am struggling to extract the correct bit of a log message.
what I want to extract is the AgentID which sits at the end of the string and comprises 8 alphanumerics, a hyphen and then 8 more alphnumerics.
In this case the value I am after is: 1547697e-74b96d16
The message/string looks like this:
"AgentFullPath" => "/root/SiteHome/PNMDemo/DemoTesting/Feb24Project/1547697e-74b96d16"
My grok looks like this:
match=>{"AgentFullPath"=>"%{GREEDYDATA}/%{GREEDYDATA:AgentID}$"}
I am getting everything after the first backslash. So I get this:
"AgentID" => "root/SiteHome/PNMDemo/DemoTesting/Feb24Project/1547697e-74b96d16"
How do I get grok to work backwards along the string from the end of line ($) rather than forwards?
Thanks!