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 Previous  1, 2, 3  Next
 Clarification : email alert when queue is 80% « View previous topic :: View next topic » 
Author Message
basabi2520
PostPosted: Tue Sep 18, 2012 1:41 am    Post subject: Reply with quote

Apprentice

Joined: 05 Jun 2012
Posts: 28
Location: singapore

Everything works fine. Successfully tested . Thanks bruce2359 n others.

Read msg from SYSTEM.ADMIN.PERFM.EVENT using amqsbcg.java
http://www.capitalware.biz/mq_code_java.html

Is that possible to trigger directly a java program to send a alert mail instead using shell script??? Or only possible to trigger a java program thru shell script?? googling .....

Thanks.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Tue Sep 18, 2012 3:41 am    Post subject: Reply with quote

Poobah

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

basabi2520 wrote:

Is that possible to trigger directly a java program to send a alert mail instead using shell script??? Or only possible to trigger a java program thru shell script?? googling .....

Thanks.

What have you tried? What were the results?
_________________
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: Wed Sep 19, 2012 5:30 pm    Post subject: Reply with quote

Apprentice

Joined: 05 Jun 2012
Posts: 28
Location: singapore

My task was to generate a alert email when a queue reaches 80%.
With the help and suggestions i have generated the mail and learnt some basic things with MQ.
Follwoing are something i tried:
1.Created a testQ with QDEPTHHI(80) QDPHIEV(ENABLED)
2.Enable perfm event: ALTER QMGR PERFMEV (ENABLED)
3.set TRIGTYPE (FIRST) TRIGDEPTH (1) for SYSTEM.ADMIN.PERFM.EVENT
4.Define initialization Q.
5.Define process in PERFM.EVENTQ
PROCESS(SY31.SM.PROCESS) APPLTYPE(UNIX)
APPLICID(/appn/sy31/QdepthHiAlert.sh) ENVRDATA( )
USERDATA( )
DESCR(PROCESS FOR TESTING QDEPTH HIGH EVENT)
6.run trigger runmqtmc [-m QMgrName] [-q InitQ]

When TESTQ reaches 80% , receving a alert mail.

Thank You
Back to top
View user's profile Send private message
basabi2520
PostPosted: Wed Sep 19, 2012 6:27 pm    Post subject: Reply with quote

Apprentice

Joined: 05 Jun 2012
Posts: 28
Location: singapore

Previously i generated alert mails thru shell script. Now jus trying with java program .
Hope java mq lib can easily read and display the trigger msg and queue msg thru the alert mail.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Wed Sep 19, 2012 7:03 pm    Post subject: Reply with quote

Poobah

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

basabi2520 wrote:

4.Define initiation Q, not initialization Q


Wouldn't you also want to get another email when queue depth dropped to 20%? This would be good news, wouldn't it? Perhaps the increase in queue depth was transitory.

Enable queue depth low; and send yourself a second email alerting you to the fact that the problem seems to have been resolved.
_________________
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
bruce2359
PostPosted: Wed Sep 19, 2012 7:03 pm    Post subject: Reply with quote

Poobah

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

Moved to Performance Monitoring forum.
_________________
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 23, 2012 6:28 pm    Post subject: Reply with quote

Apprentice

Joined: 05 Jun 2012
Posts: 28
Location: singapore

finding difficult to read msg from PERFM.EVENT Q using shell script. I can able to do that using JAVA. Is there any ways to read using shell script??
Ultimate task was to put the Q msg in the content of the alert mail. Any suggestions??

Thanks
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sun Sep 23, 2012 6:51 pm    Post subject: Reply with quote

Grand High Poobah

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

basabi2520 wrote:
finding difficult to read msg from PERFM.EVENT Q using shell script. I can able to do that using JAVA. Is there any ways to read using shell script??
Ultimate task was to put the Q msg in the content of the alert mail. Any suggestions??

Thanks

If you find it relatively easy to do using java why don't you use the java implementation of send mail?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
basabi2520
PostPosted: Sun Sep 23, 2012 9:28 pm    Post subject: Reply with quote

Apprentice

Joined: 05 Jun 2012
Posts: 28
Location: singapore

Thanks fro your reply fjb_saper,
I don have permission to set classpath for MQ jar files. So planned to read msg from PERFM.EVENT q in shell script and jus send mail wilth the msg.

One more clarification:

1.TESTQ generates a QDPHIEV event and that puts a msg into PERFM.EVENT Q , where a trigger is invoked with depth 1 and type FIRST.
2.Process is called by the trigger where a shell script is called to send a alert mail.

How to get the TESTQ name in the process defined in event q, if i try to get QNAME , as we know it will only display the SYSTEM.ADMIN.PERFM.EVENT !!! I need to get the QNAME where QDPHIEV fired.

Thanks,
Back to top
View user's profile Send private message
bruce2359
PostPosted: Mon Sep 24, 2012 1:51 pm    Post subject: Reply with quote

Poobah

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

The name of the queue that reached high-depth is in the event message.
_________________
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 24, 2012 3:22 pm    Post subject: Reply with quote

Apprentice

Joined: 05 Jun 2012
Posts: 28
Location: singapore

Yes i can able to read using java. i need to read in shell script! Any possibilities???
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Sep 24, 2012 3:47 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

basabi2520 wrote:
Yes i can able to read using java. i need to read in shell script! Any possibilities???


Write java that you run from shell script.

There is no 'shell script' API that can access the contents of MQ messages. You must use a program written in one of the languages that MQ provides an official API for.

You say that you are unable to specify the classpath in order to point to the MQ jar files. That's not entirely unreasonable on the part of the people who tell you that you can't do it.

But it in no way prevents your shell script from using the command line options on the java command to specify the classpath for the specific instance of the specific java program that is being run. I.e. "java --classpath...."
Back to top
View user's profile Send private message
basabi2520
PostPosted: Mon Sep 24, 2012 4:43 pm    Post subject: Reply with quote

Apprentice

Joined: 05 Jun 2012
Posts: 28
Location: singapore

Thanks for your confirmation.
Back to top
View user's profile Send private message
basabi2520
PostPosted: Wed Oct 03, 2012 5:42 pm    Post subject: Reply with quote

Apprentice

Joined: 05 Jun 2012
Posts: 28
Location: singapore

Hi all,

wrote a java application to read message from PERFM.EVENT queue and send an alert mail. Then called the java application from shell script using
wget --spider < Java application >.

What will happen when QDPHIEV enabled for 2 queues and what happens when QDPHIEV events occurs at the same time?

Thanks
Back to top
View user's profile Send private message
exerk
PostPosted: Thu Oct 04, 2012 12:05 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

basabi2520 wrote:
What will happen when QDPHIEV enabled for 2 queues and what happens when QDPHIEV events occurs at the same time?

Those will be two separate events so what do you think will happen?
_________________
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
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2, 3  Next Page 2 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.