automatic send alert email when job hung

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
yxong
Participant
Posts: 12
Joined: Tue Mar 16, 2004 1:29 pm

automatic send alert email when job hung

Post by yxong »

Hi,

does any one have job or routine or shell script that is automatic send email if job hung?

thanks in advance.

Yen
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Yen,

how would you determine whether or not a job is "hung"? Once you have that definition - which isn't easy or possible, in my opinion - the send mail part is easy as it already is part of DataStage.
Ultramundane
Participant
Posts: 407
Joined: Mon Jun 27, 2005 8:54 am
Location: Walker, Michigan
Contact:

Post by Ultramundane »

I wrap a timer around my dsjob call in my dsjob invoker script. The timer is a parameter number of minutes. The default is 60 minutes. But can be specified as anything between 1 and whatever. When the time is exceeded, an email/page (to designated ids) and openview message are sent via the script that the job is wrong long. The job is not terminated as it may just be running long or the time needs to be increased.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

There is a job called MonitorSeq in EtlStats which you could modify to to send you an email if a job runs long. Rght now it gets row counts and emails the log of all jobs that fail in a sequence. Instead of a wrapper this would need to start at the same time or right after you start the job you want to monitor.
Mamu Kim
yxong
Participant
Posts: 12
Joined: Tue Mar 16, 2004 1:29 pm

Post by yxong »

Hello Kduke, Autranumdane and ArndW - Thank you so much for such a quick response.

Kduke - Where do I find job MonitorSeq in EtlStats? I went to your website http://www.duke-consulting.com/KimD/DataStage_Tips.htm, I clicked etlstat.zip, it said page can not be found. I haven't experienced any DS routine. Any help from you will be greatly appreciated.

Ultramundance - I am also interesting how you wrap a timer in dsjob. Can you please send the sample script & how it call in dsjob? Thanks for your feed back.

ArndW - I determined job hung if it runs more than 2 hours, especially incremental update job. these jobs are run nightly and and they should not take more than 2 hours. This specific job took 17 hours and job status is still running. this job is definitely got hung.

thanks for all your helps. I am looking for your advice.

Yen
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

I just clicked on EtlStats.zip and it asks open or save to download the file. Maybe your site has this blocked. Your link does not work because there is a comma on the end of the URL.
Mamu Kim
yxong
Participant
Posts: 12
Joined: Tue Mar 16, 2004 1:29 pm

Post by yxong »

Hello Kduke,

Now I was able to imported job MonitorSeq into DS. How and what sequent am I going run this job along with specific job?

thanks,

Yen
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

I have not used this job in a while but if I remember correctly this job needs to start at almost the same time as the job you want to monitor. You give it the job name to monitor. It will loop until the job finishes. It was designed to run EtlChkSeqJobsNotRun and send you the log file of any job that failed. You would need to modify it to email a message when a time frame is exceeded. It is fairly straight forward. I wrote this several years ago and have not used it since so let me know if you get it to meet your needs. I would add a parameter for max time to wait before emailing.
Mamu Kim
Amber
Participant
Posts: 8
Joined: Mon Nov 16, 2015 7:17 pm
Location: Sydney

Post by Amber »

kduke wrote:There is a job called MonitorSeq in EtlStats which you could modify to to send you an email if a job runs long. Rght now it gets row counts and emails the log of all jobs that fail in a sequence. Instead of a wrapper this would need to start at the same time or right after you start the job you want to monitor.
Hi,

Where can I find this job MonitorSeq in EtlStats?
Can you please provide me the latest link.

Appreciate for the help.
Thanks.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

http://www.raywurlod.com/

Link at the bottom of the page.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply