Splunk Search

regex to fetch values within delimiters

rkishoreqa
Communicator

Hi team, 

 

Please help with the regex to fetch the values from below payload -  serverName, HostNumber. 

"{\n \"process\": \"Monitoring\",\n \"serverName\": \"\",\n \"HostNumber\": \"\",\n \"startDate\": \"\",\n \"firstName\": \"person _anusha1234\",\n \"lastName\": \"dev1234\",\n \"emailAddress\": \3423423213213@ada.com\,\n \"personnelNumber\": \"812060\",\n \"status\": \"FAILED\",\n \"code\": \"APP:Login_ERR001\",\n \"message\": \"\\\"218177-123132 does not exist in LDAP\\\"\",\n \"errorRecord\": \"BirthName:|BirthPlace:|ActiveFlag:|Role:PINV|Environment:|PrimaryInRole:|HostNumber:|Reference:123132|AlternateNumber:3223|serverName:abc|SubjectStatus:|CreatedBy:|Department:|DiscontinuedDate:|DiscontinuedFlag:N|EmployeeID:|EmployeeStatus:|EmploymentReason:|EmploymentType:|EndDate:|StartDate:|FirstName:person _anusha1234|LastName:dev1234|NPINumber:812060|AddressLine1:|AddressLine2:|AddressLine3:|City:|CountryISO3Code:|Province:|Zip:|EmailAddress:3423423213213@ada.com|Fax:|PhoneNumber:|PersonnelNumber:812060\"\n}\",\n \"tracePoint\" : \"FLOW\",\n \"priority\" : \"INFO\",\n \"category\" : \"com.wipro.api\",\n \"elapsed\" : 1893,\n \"timestamp\" : \"2021-11-09T11:19:53.943Z\",\n \"applicationName\" : \"Monitoring\",\n \"applicationVersion\" : \"v1\",\n \"environment\" : \"Stage\",\n \"threadName\" : \"[MuleRuntime].uber.70: [wipro-prc-primary-monitoring].log-data-for-splunk-dashboard/processors/1.ps.BLOCKING @a8ff6c0\"\n}

 

Thanks in Advance

RK

Labels (2)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| rex "\|HostNumber:(?<hostnumber>.*?)\|.*\|serverName:(?<servername>.*?)\|"
0 Karma
Get Updates on the Splunk Community!

.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 ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...