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 » I am trying for some automation script

Post new topic  Reply to topic Goto page Previous  1, 2, 3  Next
 I am trying for some automation script « View previous topic :: View next topic » 
Author Message
mqjeff
PostPosted: Wed Sep 24, 2014 6:01 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

shanms wrote:
BCZ company is not ready hire more resource


Make sure to include your boss on all pages/emails.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Sep 24, 2014 6:03 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

shanms wrote:
BCZ company is not ready hire more resource


And you're not ready to correctly size your system to prevent these (probably spurious) alerts.

As a point of interest, you've developed a system that reports queues filling due to network problems. You get an email every 15 minutes reporting this situation. What do you do with this information? What value is it? The application putting the messages has already failed with a 2053 error so the business people who use that function are SOL, the network people have already failed to respond to whatever monitoring they have in a timely fashion so what use is you reporting that you have an inbox full of errors? The application people already know and the network people already know and don't care.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
shanms
PostPosted: Wed Sep 24, 2014 7:59 pm    Post subject: Reply with quote

Apprentice

Joined: 17 Jun 2014
Posts: 38

Hi Vitor,

Thanks for your reply ,yes it's correct what your saying ,for temporary purpose i will use this automation.May be in feature i will get something else.
Back to top
View user's profile Send private message
exerk
PostPosted: Thu Sep 25, 2014 12:00 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

shanms wrote:
...May be in feature i will get something else.

Then make your solution as management-unfriendly or flaky as you can because 'tactical' solutions such as this have a very n.a.s.t.y habit of becoming 'strategic' because they work, albeit at a very low level of what is actually required.
_________________
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
Vitor
PostPosted: Thu Sep 25, 2014 5:01 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

shanms wrote:
for temporary purpose i will use this automation.


For what? I still don't understand how this helps.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
shanms
PostPosted: Wed Oct 01, 2014 2:08 am    Post subject: Reply with quote

Apprentice

Joined: 17 Jun 2014
Posts: 38

Hi Vitor,

Here is my script details.

one mqsc file
one vb script(for email alert)
one text file(which will copy the result)
one batch script


mqsc file contains :dis ql(queue name) CURDEPTH




vb script contains the the alert mail :


Code:
Dim objFSO, filepath, objInputFile, tmpStr, substrToFind, tmpSStart, tmpSend, tmpSChar, tmpSVal
Set objFSO = CreateObject("Scripting.FileSystemObject")
filepath = "\queuedepth.txt"
substrToFind = "CURDEPTH("

Set objInputFile = objFSO.OpenTextFile(filepath)

do until objInputFile.AtEndOfStream
   tmpStr = objInputFile.ReadLine
   
   If InStr(tmpStr, substrToFind) <=0 Then
      rem WScript.Echo "No matches"
   Else
      rem wscript.echo tmpstr


tmpSStart = InStr(tmpstr,"(")
 tmpSEnd = InStr(tmpstr,")")
 tmpSEnd = tmpSEnd -1
 tmpSChar = tmpSEnd - tmpSStart
 tmpSStart = tmpSStart + 1
 tmpSVal = Mid(tmpstr,tmpSStart,tmpSChar)

rem wscript.echo tmpSval

      if tmpsval>=100 then

Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "-  QUEUE DEPTH EXCEEDED - " + tmpstr
objMessage.From = "mail id"
objMessage.To = "mail id's"
objMessage.TextBody = "The Current Queue Depth is " + tmpsval


' Configure the send to use another server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") =

' Now we provide the configuration information for the remote SMTP server
' (normally you will only change the server name or IP)
' Name or IP of Remote SMTP Server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = ""

' Server port
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") =

' Save the new configuration settings
objMessage.Configuration.Fields.Update

objMessage.Send



       end if

   End If
loop
objInputFile.Close


EDIT by exerk: please use code tags in future, thank you.

Finally batch script contains the

del Z:\...\queuedepth.txt
runmqsc QMGR <Z:\....\dispqm.mqsc >> Z:\...\queuedepth.txt

Z:\...\Email.vbs
Back to top
View user's profile Send private message
vicentius
PostPosted: Wed Oct 01, 2014 2:16 am    Post subject: Reply with quote

Apprentice

Joined: 01 Mar 2013
Posts: 28

I'm sure Vitor was more interested in how this contraption helps you when smelly hits the fan. What value does endless streams of emails that stuff went wrong add to the whole solving of undesirable situations?
Back to top
View user's profile Send private message
shanms
PostPosted: Wed Oct 01, 2014 2:48 am    Post subject: Reply with quote

Apprentice

Joined: 17 Jun 2014
Posts: 38

Hi vicentius,

My concept is simple,if my queue reaches 100 above then i will get a mail alert.
it's already implemented per day i am getting 3 to 4 mails.
Back to top
View user's profile Send private message
exerk
PostPosted: Wed Oct 01, 2014 3:19 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

shanms wrote:
My concept is simple,if my queue reaches 100 above then i will get a mail alert...

In the great scheme of things a depth of 100 is pretty negligible...

...and what method are you using to ensure your email wakes you up at night?
_________________
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
PeterPotkay
PostPosted: Wed Oct 01, 2014 6:57 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7717

exerk wrote:
shanms wrote:
My concept is simple,if my queue reaches 100 above then i will get a mail alert...

In the great scheme of things a depth of 100 is pretty negligible...

Its all relative I suppose.

If each message contains "We successfully pulled $1000.00 from exerk's account, and he never noticed.".....
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Oct 01, 2014 7:06 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

PeterPotkay wrote:
"We successfully pulled $1000.00 from exerk's account"

That's quite optimistic of you....
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Oct 01, 2014 7:44 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

vicentius wrote:
I'm sure Vitor was more interested in how this contraption helps you when smelly hits the fan. What value does endless streams of emails that stuff went wrong add to the whole solving of undesirable situations?



_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
exerk
PostPosted: Wed Oct 01, 2014 8:02 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

PeterPotkay wrote:
exerk wrote:
shanms wrote:
My concept is simple,if my queue reaches 100 above then i will get a mail alert...

In the great scheme of things a depth of 100 is pretty negligible...

Its all relative I suppose.

If each message contains "We successfully pulled $1000.00 from exerk's account, and he never noticed.".....

Fair point...
_________________
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
exerk
PostPosted: Wed Oct 01, 2014 8:03 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

mqjeff wrote:
PeterPotkay wrote:
"We successfully pulled $1000.00 from exerk's account"

That's quite optimistic of you....


_________________
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
shanms
PostPosted: Wed Oct 01, 2014 8:56 am    Post subject: Reply with quote

Apprentice

Joined: 17 Jun 2014
Posts: 38

Hi All,

my script is giving alert for above 100 queue depth after 15mins it should not get any alert bcz with in 15mins msg will be processed ,if msg are not processed then again mail will come .script will run every 15mins,this span of time 99% msg will process if not something going wrong with system,for this purpose only we prepared this script.
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 » I am trying for some automation script
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.