ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Performance Monitoring » Clarification : email alert when queue is 80%

Post new topic  Reply to topic Goto page 1, 2, 3  Next
 Clarification : email alert when queue is 80% « View previous topic :: View next topic » 
Author Message
basabi2520
PostPosted: Tue Jul 03, 2012 6:04 pm    Post subject: Clarification : email alert when queue is 80% Reply with quote

Apprentice

Joined: 05 Jun 2012
Posts: 28
Location: singapore

Hi,
This post is related to my previous topic. Need to get an email alert when a queue is nearing 80%. According to my understanding have listed out some points. Can anyone help whether my study is rite? so that i can test.

1. Create an performance event when queue reaches 80%
ALTER QMGR PERFMEV(ENABLED)
ALTER QLOCAL('MYQUEUE') QDEPTHHI(80) QDPHIEV(ENABLED)

2. Define a trigger when a msg put into the queue and it calls for a process definition
DEFINE QLOCAL(TRIG.EXAMPLE.QLOCAL) +
DESCR('Example Queue for Triggering') +
DEFPRTY(0) +
DEFSOPT(SHARED) +
GET(ENABLED) +
MAXDEPTH(5000) +
MAXMSGL(4194304) +
MSGDLVSQ(PRIORITY) +
PUT(ENABLED) +
RETINTVL(999999999) +
TRIGTYPE(EVERY) +
PROCESS(TRIG.EXAMPLE.PROCESS) +
INITQ(TRIG.EXAMPLE.INITQ) +
USAGE(NORMAL) +
REPLACE

3. Process definition calls an application script written in .bat,.sh,etc
DEFINE PROCESS (TRIG.EXAMPLE.PROCESS) +
DESCR('Example Process for Triggering') +
APPLTYPE(UNIX) +
APPLICID(/MQ/emailMessage.sh) +
REPLACE

5. runmqtrm -m QMNAME -q TRIG.EXAMPLE.INITQ &

4. Script sends an email alert.

thanks,
Baskar
Back to top
View user's profile Send private message
Mr Butcher
PostPosted: Tue Jul 03, 2012 10:35 pm    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

why dont you just test to verify your study is right?
_________________
Regards, Butcher
Back to top
View user's profile Send private message
basabi2520
PostPosted: Tue Jul 03, 2012 10:51 pm    Post subject: Reply with quote

Apprentice

Joined: 05 Jun 2012
Posts: 28
Location: singapore

Thanks for your reply. This is my initial study and was given a task. Since am new to MQ i was not given permission to execute commands even in test env. So finding difficult , If you could tell me , am i understanding it correctly?? so that it will be helpful for me to explore further and can get permission to test !!!

thanks
Baskar
Back to top
View user's profile Send private message
exerk
PostPosted: Tue Jul 03, 2012 11:51 pm    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

Change the TRIGTYPE to FIRST is one suggestion, as to the reason why, the manual will explain better than I can. Overall what you are doing is OK, but consider that if you are generating an alert at 80% full, what might happen between the time that event is generated and the email being received and reacted to, i.e. you might want to think about automated queue depth increase too.
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
basabi2520
PostPosted: Wed Jul 04, 2012 12:24 am    Post subject: Reply with quote

Apprentice

Joined: 05 Jun 2012
Posts: 28
Location: singapore

exerk thanks for your reply and suggestions.
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Wed Jul 04, 2012 5:34 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7717

exerk wrote:
you might want to think about automated queue depth increase too.



If you'll allow some process to automatically increase the max q depth in the future, why not just build the queue to begin with at that true max q depth? Relying on some automatic process to increase the q depth to what you really need just introduces a point of failure.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
exerk
PostPosted: Wed Jul 04, 2012 8:06 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

PeterPotkay wrote:
exerk wrote:
you might want to think about automated queue depth increase too.



If you'll allow some process to automatically increase the max q depth in the future, why not just build the queue to begin with at that true max q depth? Relying on some automatic process to increase the q depth to what you really need just introduces a point of failure.

A valid point. The problem I have is that the customer at my present site doesn't know what their messages sizes are, or frequency, let alone likely max depths. I could just as easily set 999,999,999 as a max depth but prefer not to. At the moment I'm using automation to trap problem-child areas in a project that is a lift-and-shift, and in truth a bit of a mess. Once I have a profile for the solution, I can set attributes correctly. I'm sure there are better ways of doing it
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
basabi2520
PostPosted: Mon Sep 03, 2012 7:49 pm    Post subject: Reply with quote

Apprentice

Joined: 05 Jun 2012
Posts: 28
Location: singapore

Hi all,

Back with the same old topic. From previous replies have tested on getting a automated mail when queue reaches 80%

ALTER QLOCAL(SY31.SM.TESTQ) QDEPTHHI(80) QDPHIEV(ENABLED) MAXDEPTH(10)
PROCESS(SY31.SM.PROCESS) INITQ(SY31.SM.INITQ)

PROCESS(SY31.SM.PROCESS) APPLTYPE(UNIX)
APPLICID(/appn/sy31/QdepthHiAlert.sh) ENVRDATA( )
USERDATA( )
DESCR(PROCESS FOR TESTING QDEPTH HIGH EVENT)

But i get alert mails for every messages put into the queue. Looking forward your help to sort out this problem. Where am i making the mistake.

thanks,
basabi2520
Back to top
View user's profile Send private message
bruce2359
PostPosted: Mon Sep 03, 2012 10:13 pm    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9442
Location: US: west coast, almost. Otherwise, enroute.

Yep, you sure do. You have (incorrectly) enabled triggering for SY31.SM.TESTQ thinking that this will trigger an email. Triggering this queue will launch an app to consume (process) your app messages. What you really want (in addition to processing your app messages) is an event message when the queue reaches 80% full.

Yes, you have enabled qdepthhi. When the event occurs, the qmgr puts an event message into an instrumentation event queue.

It is the instrumentation queue that you want to also trigger, so that when the event occurs, your app will get the event message, and send an email.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
basabi2520
PostPosted: Sun Sep 16, 2012 10:33 pm    Post subject: Reply with quote

Apprentice

Joined: 05 Jun 2012
Posts: 28
Location: singapore

Thanks bruce2359 .

It works fine after enabling performance event and i can send an alert mail from the process defined in it.

Can anyone help me how to get the queue name in the process definition and send as a parameter to the mail script????

thanks
Back to top
View user's profile Send private message
bruce2359
PostPosted: Mon Sep 17, 2012 4:27 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9442
Location: US: west coast, almost. Otherwise, enroute.

The queue name is found in the trigger event message.

What value is there in getting an email when the queue gets to 80%? Will you be able to do something in time to avoid queue-full?

What is your hesitation in setting maxdepth to 999,999,999?

You could write a script that sets maxdepth up by 20% when queue-depth-high event occurs; then set it down by %20 when queue-depth-low occurs. This would allow for spikes in message arrival.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
basabi2520
PostPosted: Mon Sep 17, 2012 5:48 pm    Post subject: Reply with quote

Apprentice

Joined: 05 Jun 2012
Posts: 28
Location: singapore

bruce2359 thanks for your suggestion . Am still in testing phase. Hop will take sometime to a real testing in production.

Some more clarifications:

1. Below is the alert mail body content which i never specified. From where does it comes from??? perfm.event or trigger msg ???

TMC 2SYSTEM.ADMIN.PERFM.EVENT SY31.SM.PROCESS /appn/sy31/QdepthHiAlert.sh /appn/sy31/bds1mailheader MQT25

2. How to read SYSTEM.ADMIN.PERFM.EVENT and trigger msgs?

Thanks
Back to top
View user's profile Send private message
basabi2520
PostPosted: Mon Sep 17, 2012 5:50 pm    Post subject: Reply with quote

Apprentice

Joined: 05 Jun 2012
Posts: 28
Location: singapore

With all the suggestions and guides i hope am in rite track . Am i??
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Sep 17, 2012 7:48 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20729
Location: LI,NY

bruce2359 wrote:
You could write a script that sets maxdepth up by 20% when queue-depth-high event occurs; then set it down by %20 when queue-depth-low occurs. This would allow for spikes in message arrival.

Dangerous thinking... if memory serves well once queue high depth is triggered it won't trigger again until qdepth low is triggered. That is unless you manually reset the trigger. So if you up the qdepth by 20% and leave the trigger at 80% will that trigger again when the threshold gets hit without first passing qlow? I thought this was another reason why most of these notifications are done by the monitoring software and not qdepth events...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
bruce2359
PostPosted: Mon Sep 17, 2012 7:53 pm    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9442
Location: US: west coast, almost. Otherwise, enroute.

basabi2520 wrote:

1. Below is the alert mail body content which i never specified. From where does it comes from??? perfm.event or trigger msg ???

TMC 2SYSTEM.ADMIN.PERFM.EVENT SY31.SM.PROCESS /appn/sy31/QdepthHiAlert.sh /appn/sy31/bds1mailheader MQT25

This is a trigger message (TMC). The format of a trigger message may be found in the WMQ Application Programming Reference, or by searching google for 'websphere mq+tmc'.

Trigger messages are created when a trigger fires. Data in the trigger message is taken from fields from the QLocal and Process definition.

basabi2520 wrote:
2. How to read SYSTEM.ADMIN.PERFM.EVENT ... msgs?

amqsbcg SYSTEM.ADMIN.PERFM.EVENT queuemanagername
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2, 3  Next Page 1 of 3

MQSeries.net Forum Index » IBM MQ Performance Monitoring » Clarification : email alert when queue is 80%
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.