13 May 2019 08:39 PM - last edited on 14 Dec 2021 10:03 AM by MaciejNeumann
We need to find all texts which satisfying one of the pattern in a text/sting
1 having two words in order RecordType:5 and ServiceType:SOAP
2 having two words in order RecordType:5 and ServiceType:REST
3 contains Service Fail
Test 1
RecordType:5;Timestamp:2019-05-13 10:52:56;LogPriority:ERROR;Component:pyWorkPage;ServiceType:SOAP;ServiceName:SOAPServiceName;TotalResponseTime:194.0;Function: SOAPServiceName;ErrorCode:ABCD;
Text 2
RecordType:5;Timestamp:2019-05-13 10:52:56;LogPriority:ERROR;Component:pyWorkPage;ServiceType:REST;ServiceName:RestService;TotalResponseTime:194.0;Function: RestService;ErrorCode:ABCD;
Text 3
RecordType:5;Timestamp:2019-05-13 10:52:56;LogPriority:ERROR;Component:pyWorkPage;ServiceType:SOAP;ServiceName:ServiceName;TotalResponseTime:194.0;Function:ServceName;ErrorCode:Service Fail;ABCD;
Following RegEx working in APPMON , but in DT1 is not accepting this as it has some constraints. Please help me create one regex to cover the three scenarios explained above.
.*RecordType:5.*ServiceType:SOAP.*|.*Service Fail.*|.*RecordType:5.*REST.*
Solved! Go to Solution.
14 May 2019 08:51 AM
Hello Karthik,
There's no straightforward way to replicate this in Dynatrace, but I have a solution for you that comes pretty close. Take a look at this regex:
RecordType:[^@]*Service Fail[^@]*|RecordType:5[^@]*ServiceType:SOAP[^@]*|RecordType:5[^@]*ServiceType:REST[^@]
In order for it to work as expected, two prerequisites must be met:
We are aware of the fact, that not every regular expression customers were using in AppMon can get translated easily to Dynatrace. Reason for these restrictions is simply the danger of regexes regarding overhead.
Let me know if that helps,
Reinhard
16 May 2019 04:03 PM - last edited on 09 Dec 2024 10:54 AM by MaciejNeumann
it worked, thx a lot Reinhard