Sunday, January 5, 2014

How to Add a Condition using SHOUT (POSTPROC)

As most of us know that we can add conditions using "Conditions" tab or through steps tab.  Normally we can add/remove conditions based on the below scenario's.
  • When job Ended OK (using Conditions Tab)
  • When the job Ended NOTOK (using Steps Tab)
  • When a job failed with a specific return code (using Steps Tab)
  • When you find a particular string in Log/Sysout (using Steps Tab)
  • When Run Counter criteria met (using Steps Tab)
... there might be many other scenario's where we may need to add/remove conditions. few of them are When a job executing for longer time, or If the job not submitted by a particular time or If the job not completed by a certain time. In general we will trigger an ALERT in these scenario's using PostProc tab. Now I'm going to explain you how can we add a condition instead of generating an alert.

Like how we use LateTime/ExecTime/LateSub, we'll goto PostProc tab and select the particular event which you would like to check and add a condition.

A SHOUT WHEN EXECTIME > nnn (The range is 001 to 999 in minutes only) or 
A SHOUT WHEN LATE SUB > HHMM or 
A SHOUT WHEN LATE TIME > HHMM

If you want to Average time then use + and you can also use % (percentage) to limit above the average time.

Here is the example:



"condition" must be added in the shout destination table as a script i.e program as destination. You can name as you desire (something like add-condition.sh). The script should contain the below statement to add the condition.

ctmcontb –add $2
The ctmcontb utility performs different operations on prerequisite conditions in the Control-M/Server database (Like Add, Delete, List conditions).

In the same way you can also invoke any other utility depend upon the requirement.

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Awesome Deals | Bloggerized by Mahendra - 24x7FunOnline