Splunk Search

How do I create Fields for MacAddress and UserName?

jimzzhou
Engager

I have a syslog look like this and I would like to create Fields for MadAddress and UserName.
Any idea?

thanks,

Nov 30 14:54:44 172.20.166.16 ALARM: 1354318234l | system | info | ALR | Station Info Update : MacAddress : 7c:c5:37:60:68:87, UserName : , AP-Id : 44, AP-Name : AP95-GL286, BSSID : 00:12:f2:44:2c:01, ESSID : NGSTV224, Ip-Type : unknown, Ip-Address : 0.0.0.0, L2mode : clear, L3-mode : clear, Vlan-Name : nps, Vlan-Tag : 225

Tags (1)
0 Karma

nmistry_splunk
Splunk Employee
Splunk Employee

It will look something like this -


.. | rex field=_raw "MacAddress : (?<mac>[^,.]*),.*UserName : (?<uname>[^,.]*)" | table mac, uname

Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...