Splunk AppDynamics

Logfile Extension and Regular Expressions

Hoosain_Madhi
New Member

how do I use a regular expression to match a pattern in a logfile - I am using LogFile extension

for example from the following line specific to a "Response" msg

{"remoteHost":"epdg","epoch":1648084954231,"command":"Response","Result-Code",{"value":1001}},"statusCode":"2001","status":"FOO ","timestamp":"2022-03-24 03:22:34.231"}

 

can I use a regular expression to find statusCode NOT 2001 indicating a failure - If so what regex should I use?

cant seem to find documentation

 

Labels (1)
0 Karma

Hoosain_Madhi
New Member

After looking at all possible statusCodes the regex I came up with is :

.*"command":"Response".*"statusCode":"[1|3|4|5].*".*

I am not sure on what to put in the config.yml – any ideas?

- displayName: "Diameter-EAP-Response-Failures"

    pattern: "?????"

    matchExactString: false

    caseSensitive: false

    printMatchedString: false

0 Karma
Get Updates on the Splunk Community!

Fueling your curiosity with new Splunk ILT and eLearning courses

At Splunk Education, we’re driven by curiosity—both ours and yours! That’s why we’re committed to delivering ...

Splunk AI Assistant for SPL 1.1.0 | Now Personalized to Your Environment for Greater ...

Splunk AI Assistant for SPL has transformed how users interact with Splunk, making it easier than ever to ...

Unleash Unified Security and Observability with Splunk Cloud Platform

     Now Available on Microsoft AzureOn Demand Now Step boldly into the AI revolution with enhanced security ...