Grok Filter 只想查看进程名

Grok Filter want to see only the processname

我只想查看进程 cmd.exe。

示例:

New Process Name: C:\Windows\System32\cmd.exe  Token Elevation Type: %%1938  Creator Process ID: 0x1a0`enter code here`

Grok 过滤器:

New Process Name: %{GREEDYDATA}\%{GREEDYDATA:Process}

输出:

{
  "Process": [
    [
      "cmd.exe  Token Elevation Type: %%1938  Creator Process ID: 0x1a0`enter code here`"
    ]
  ]
}

我如何只看到 cmd.exe 而看不到令牌提升类型:%%1938 创建者进程 ID:0x1a0`enter?

GREEDYDATA 通常表示 "everything"。我发现它通常没有用,除非在模式的末尾(作为包罗万象)。

所以,您在反斜杠后要求所有内容,这就是您得到的。

怎么样:

New Process Name: %{GREEDYDATA}\%{NOTSPACE:Process}