I have several log files as source of Splunk events.
C:\logs\Srv1\file1_2019-05-06.log
C:\logs\Srv84\file3_2019-05-06.log
C:\logs\Glob9\file18_2019-05-06.log
I am trying to extract the immediate parent directory name from the source field of events. So in a custom extracted field "appname", I am hoping to get values Srv1, Srv84 and Glob9 from examples above.
Here's what I am doing.
Splunk Web > Settings > Fields > Fields Extractions > Add new
Destination app: search
Name: source_app_name
Apply to: source named: app_name
Type: Inline
Extraction/Transform: ^.+\x5C(?<appname>(.+))\x5C[^\x5C]*$
Sharing: Global, All apps, Read permission to everyone.
When I run my search ...| extract reload=t I can't find appname field in All fields. All fields is selected in the Select field list.
Am I doing anything wrong with my field extraction, or with my search?
... View more