Sample Header Ad - 728x90

Extracting "devname" from log message with re_extract

1 vote
1 answer
69 views
Can anyone help? I've exhausted my knowledge and troubleshooting skills trying to get this working. Here is the example data from "msg":
date=2025-03-26 time=12:45:57 devname="this-is-the-host" devid="CD188764823423" eventtime=1742993157871312130 tz="+0000" logid="0001000014" type="traffic" subtype="local" level="notice"
... and here is the code I was hoping would capture the value "this-is-the-host" into the variable I named dname:
set $.dname = tolower(re_extract($msg, 'devname=\"(.*)\" devid=', 0, 1, "failed"));
Is there an easier way, maybe using the split function? I'd appreciate your thoughts.
Asked by user2008555 (11 rep)
Mar 26, 2025, 01:04 PM
Last activity: May 8, 2025, 08:10 PM