Getting Data In

Log Parsing is not working

sivaranjiniG
Communicator

i have a standalone splunk machine there i am monitoring a airwatch sample log

Nov 13 20:48:19 AirWatch AirWatch Syslog Details are as follows Event Type: ConsoleEvent: ApplicationPublishedUser: xxx.yyyEvent Source: ServerEvent Module: AppsEvent Category: ApplicationsEvent Data: LoginSessionID=;Application=xxx;ApplicationType=Internal;ApplicationVersion=0.95.251112.0;ApplicationUUID=xxx-35e8-40a3-b7ec-e3e28261002d;ApplicationBundle=com.xxx.mersal Event Timestamp: Nov 13 20:48:18
Nov 13 20:48:19 AirWatch AirWatch Syslog Details are as follows Event Type: DeviceEvent: InstallApplicationRequestedUser: xxx.yyyEvent Source: ServerEvent Module: DashboardEvent Category: CommandEvent Data: ApplicationType=Internal;Application=xxx;ApplicationVersion=CU2407.95.251112;ApplicationUUID=xxx-35e8-40a3-b7ec-e3e28261002d Event Timestamp: Nov 13 20:48:18
Nov 13 20:48:19 AirWatch AirWatch Syslog Details are as follows Event Type: DeviceEvent: InstallApplicationRequestedUser: xxx.yyyEvent Source: ServerEvent Module: DashboardEvent Category: CommandEvent Data: ApplicationType=Internal;Application=xxx;ApplicationVersion=CU2407.95.251112;ApplicationUUID=xxx-35e8-40a3-b7ec-e3e28261002d Event Timestamp: Nov 13 20:48:18
Nov 13 20:48:19 AirWatch AirWatch Syslog Details are as follows Event Type: DeviceEvent: InstallApplicationRequestedUser: xxx.yyyEvent Source: ServerEvent Module: DashboardEvent Category: CommandEvent Data: ApplicationType=Internal;Application=xxx;ApplicationVersion=CU2407.95.251112;ApplicationUUID=xxx-35e8-40a3-b7ec-e3e28261002d Event Timestamp: Nov 13 20:48:18
Nov 13 20:48:19 AirWatch AirWatch Syslog Details are as follows Event Type: DeviceEvent: InstallApplicationRequestedUser: xxx.yyyEvent Source≈: ServerEvent Module: DashboardEvent Category: CommandEvent Data: ApplicationType=Internal;Application=xxx;ApplicationVersion=CU2407.95.251112;ApplicationUUID=xxx-35e8-40a3-b7ec-e3e28261002d Event Timestamp: Nov 13 20:48:18
Nov 13 20:48:19 AirWatch AirWatch Syslog Details are as follows Event Type: DeviceEvent: InstallApplicationRequestedUser: xxx.yyyEvent Source: ServerEvent Module: DashboardEvent Category: CommandEvent Data: ApplicationType=Internal;Application=xxx;ApplicationVersion=CU2407.95.251112;ApplicationUUID=xxx-35e8-40a3-b7ec-e3e28261002d Event Timestamp: Nov 13 20:48:18
Nov 13 20:48:19 AirWatch AirWatch Syslog Details are as follows Event Type: DeviceEvent: InstallApplicationRequestedUser: xxx.yyyEvent Source: ServerEvent Module: DashboardEvent Category: CommandEvent Data: ApplicationType=Internal;Application=xxx;ApplicationVersion=CU2407.95.251112;ApplicationUUID=xxx-35e8-40a3-b7ec-e3e28261002d Event Timestamp: Nov 13 20:48:18

 

 Inputs.conf

[monitor:///Applications/Splunk/etc/apps/Data_APP/Data/dummyfile.log]
disabled = false
host = hostname
index = omnissa_idx
sourcetype = omnissa:airwatch:syslog                              

 

props.conf

[omnissa:airwatch:syslog] 
SHOULD_LINEMERGE = false 
TIME_PREFIX = ^ 
MAX_TIMESTAMP_LOOKAHEAD = 100 
REPORT-main = airwatch_main_fields, airwatch_kv_fields

 

Transforms.conf

[airwatch_main_fields] 
REGEX = Event Type:\s*(?<event_type>[^:]+):\s*(?<event_action>.*?)(?=User:)User:\s*(?<user>.*?)(?=Event Source:)Event Source:\s*(?<event_source>.*?)(?=Event Module:)Event Module:\s*(?<event_module>.*?)(?=Event Category:)Event Category:\s*(?<event_category>.*?)(?=Event Data:)Event Data:\s*(?<event_data>.*?)(?=Event Timestamp:)Event Timestamp:\s*(?<event_timestamp>.*) 
FORMAT = 

[airwatch_kv_fields] 
REGEX = (\w+)=([^;]+) 
FORMAT = $1::$2

 

the same regex is working when i apply it using rex field=_raw <regex> but its not working when i put it in the transforms

So when i use this configuration, i dont see any fields getting extracted..

But i am not sure how these below fields are extracted automatically

sivaranjiniG_0-1763376142957.png

even with below props those 4 fields are extracted 

[omnissa:duplicate]
SHOULD_LINEMERGE = false
Labels (3)
Tags (3)
0 Karma

SK99
Loves-to-Learn

@sivaranjiniG , have you defined props and transforms under the search app context? Or if you created a new app, did you check the permission for app where you have defined props and transforms? can they be used in app context search or globally? (This can be validated in Splunk by going to Manage Apps (looking for sharing attribute) and searching for the custom app (if that's the case))

I was curious to know, have your tried removing "FORMAT = " (by default it should be considered an empty string)

 

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @sivaranjiniG ,

Splunk automatically extracts all the pairs field=value, for this reason it extracts 

ApplicationType=Internal;
Application=xxx;
ApplicationVersion=CU2407.95.251112;
ApplicationUUID=xxx-35e8-40a3-b7ec-e3e28261002d

What is your issue: have you the other fields that you configured in props.conf and transforms.conf?

Ciao.

Giuseppe

0 Karma

sivaranjiniG
Communicator

The issues is other fields are not getting extracted with the regex.

Like i mentioned in my question, when i use the regex expression in search query with rex command it works i see the fields getting created but when i use the same expression in transforms its not getting extracted

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @sivaranjiniG ,

probably the sequence of information isn't the same in all the events, so putting all the extractions in the same regex, you didn't match the most events.

Try to create extractions focused on the fields you really need and create those extraction using a regex for each one, so e.g.:

| rex "Event Type: (?<Event_Type>\w+)\s*Event:"

Ciao.

Giuseppe

0 Karma
Get Updates on the Splunk Community!

Splunk Mobile: Your Brand-New Home Screen

Meet Your New Mobile Hub  Hello Splunk Community!  Staying connected to your data—no matter where you are—is ...

Introducing Value Insights (Beta): Understand the Business Impact your organization ...

Real progress on your strategic priorities starts with knowing the business outcomes your teams are delivering ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...