Splunk Search

Experiencing rex extract errors with random pattern

indeed_2000
Motivator

Hi

I have list of error codes that available here:
https://www.ibm.com/docs/en/ibm-mq/9.1?topic=exceptions-jms-exception-messages

How can I extract and show them on timechart?

what is the best way to do this? i mean when we have list of different error codes and doen't extract them one by one.

 

FYI1: as I see unique errors keyword in this senario are:

AMS JMSWMQ MQJCA MQJMS JMSXY JMSMQ JMSIC JMSFMQ JMSCS JMSCMQ JMSCC JMSBM

FYI2: these errors are random not fix pattern that extract them easily, some time locate in first part of each line sometimes locate in middle sometime in end.

 

Any idea?

Thanks

Thanks

Labels (5)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| rex "(?<errorcode>(AMS|JMSWMQ|MQJCA|MQJMS|JMSXY|JMSMQ|JMSIC|JMSFMQ|JMSCS|JMSCMQ|JMSCC|JMSBM)\d+)"

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust

Please can you share some events (in a code block </> for easier copying into sample searches) with some examples of the error codes you are trying to extract?

0 Karma

indeed_2000
Motivator

there are lot's of different patternt I'm looking for way to find these keywords:

AMS JMSWMQ MQJCA MQJMS JMSXY JMSMQ JMSIC JMSFMQ JMSCS JMSCMQ JMSCC JMSBM

within number after that like these JMSCC0031 or  JMSCC0038, and extract them in a field.

is it possible to do this without consider any string before and after that in splunk?

 

Thanks

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| rex "(?<errorcode>(AMS|JMSWMQ|MQJCA|MQJMS|JMSXY|JMSMQ|JMSIC|JMSFMQ|JMSCS|JMSCMQ|JMSCC|JMSBM)\d+)"
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Observe and Secure All Apps with Splunk

 Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What's New in Splunk Observability - August 2025

What's New We are excited to announce the latest enhancements to Splunk Observability Cloud as well as what is ...

Introduction to Splunk AI

How are you using AI in Splunk? Whether you see AI as a threat or opportunity, AI is here to stay. Lucky for ...