Highlighted
gfuchs1 Absent Member.
Absent Member.
176 views

Token not populating from Flex Connector regex

We have three tokens in our Flex Connector regex parser and the 2nd and 3rd tokens populate just fine. They write to the event fields as expected, but the 1st token never populates. The regex works fine and matches to log file entries perfectly, but the grouping for the first token returns an empty string every time. Has anyone else see this issue in the past?

Let me know if you need any further information for troubleshooting. Thanks!

# FlexAgent Regex Configuration File

regex=.*(\\w+.\\w+) (\\w+) \\S+ \\d----- (.*)

token.count=3

token[0].name=Usrname

token[0].type=String

token[1].name=Wifiname

token[1].type=String

token[2].name=Message

token[2].type=String

event.name=__stringConstant("Guest Wifi Login Registered")

event.message=__concatenate(Usrname," ",Wifiname," ",Message)

event.deviceProduct=__stringConstant("GuestWifi")

event.sourceUserName=Usrname

event.destinationUserName=Wifiname

event.deviceEventClassId=__stringConstant("0")

Labels (3)
0 Likes
Reply
1 Reply
Micro Focus Expert
Micro Focus Expert

Re: Token not populating from Flex Connector regex

Hi Gerald-

At first glance, the regex starting with .* doesn't look optimum.

Can you post some sample events, even with sanitized names?

And the token[0].name= line has a few odd characters at the end....is that just here in the posting or is that in your properties file?


0 Likes
Reply
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.