- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi All,
I Need to extract " CURDEPTH(553)" and "MAXDEPTH(15000)" as two seperate fields from the below .txt file (below is the sample stanza). Can you please help.
Thanks in advance.
1 : dis ql('PAPL.ESB.FDS.DELIVERYCONSTRUCT.QUEUE.ESBFDSIns1') curdepth,maxdepth
AMQ8409: Display Queue details.
QUEUE(PAPL.ESB.FDS.DELIVERYCONSTRUCT.QUEUE.ESBFDSIns1)
TYPE(QLOCAL) CURDEPTH(553)
MAXDEPTH(15000)
One MQSC command read.
No commands have a syntax error.
All valid MQSC commands were processed.
5724-H72 (C) Copyright IBM Corp. 1994, 2015.
Starting MQSC for queue manager PAPL_ESB_FDS_PRD_QM_223.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HI @vickram , The below should work for you.
<base search>|rex "(?i)MAXDEPTH\((?P<Maxdepth>[^\)]+)"|rex "(?i)CURDEPTH\((?P<Curdepth>[^\)]+)"|stats count by Maxdepth,Curdepth
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

index=aiam_mywizard_esb_queuedepth_analysis
|rex "(?i)MAXDEPTH((?P[^)]+)"
|rex "(?i)CURDEPTH((?P[^)]+)"
|rex "(?i)QUEUE((?P[^)]+)"
|rex "(?i)TYPE((?P[^)]+)"
| table Maxdepth Curdepth Queue type
Thanks for the help. I have made the above query. I need to calculate the percentage of the "Maxdepth" field and compare with the "Curdepth" field and find the event When the "Curdepth" reaches 75% of the "Maxdepth".
Can you please help on this.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HI @vickram , The below should work for you.
<base search>|rex "(?i)MAXDEPTH\((?P<Maxdepth>[^\)]+)"|rex "(?i)CURDEPTH\((?P<Curdepth>[^\)]+)"|stats count by Maxdepth,Curdepth
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Thanks for the help vik
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

index=aiam_mywizard_esb_queuedepth_analysis
|rex "(?i)MAXDEPTH((?P[^)]+)"
|rex "(?i)CURDEPTH((?P[^)]+)"
|rex "(?i)QUEUE((?P[^)]+)"
|rex "(?i)TYPE((?P[^)]+)"
| table Maxdepth Curdepth Queue type
Thanks for the help. I have made the above query. I need to calculate the percentage of the "Maxdepth" field and compare with the "Curdepth" field and find the event When the "Curdepth" reaches 75% of the "Maxdepth".
Can you please help on this.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Add the below after the current query @vickram
|eval Percentage=(Curdepth/Maxdepth)*100|where Percentage>=75
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

In search you can use:
| rex "CURDEPTH\((?<cur_depth>[^\)]+)\)"
| rex "MAXDEPTH\((?<max_depth>[^\)]+)\)"
in props you can use the same regex in a EXTRACT-field = ...
Hope I was able to help you. If so, some karma would be appreciated.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Works perfectly 😉 thanks much
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

index=aiam_mywizard_esb_queuedepth_analysis
|rex "(?i)MAXDEPTH((?P[^)]+)"
|rex "(?i)CURDEPTH((?P[^)]+)"
|rex "(?i)QUEUE((?P[^)]+)"
|rex "(?i)TYPE((?P[^)]+)"
| table Maxdepth Curdepth Queue type
Thanks for the help. I have made the above query. I need to calculate the percentage of the "Maxdepth" field and compare with the "Curdepth" field and find the event When the "Curdepth" reaches 75% of the "Maxdepth".
Can you please help on this.
