COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Event Studio => Topic started by: Jit on 11 May 2016 10:33:13 PM

Title: Need a mail notification after cognos job failure
Post by: Jit on 11 May 2016 10:33:13 PM
Hi All,

I need a mail notification in cognos 10.2 after my cognos job (which runs a cognos report) gets failed.Can this possible in event studio.
If yes, then please tell me the steps in detail.

Regards
Jit
Title: Re: Need a mail notification after cognos job failure
Post by: Dev1975 on 16 Nov 2016 03:30:59 AM
Hi Jit,

I'm in the same position as you, in that I need to have EventStudio automate an e-mail after a schedule completes. At the moment, I've had to manually set a schedule for the EventStudio agent to run a few minutes after the job completes. What I've done is set the EventCondition for the specific Job Name and the Job Status to "Success":

Job Name="TestJob"
AND
Job Status="Success"

I've then added an e-mail task, added the e-mail addresses required and entered some text into the e-mail body. I've saved this agent and then set a schedule against it to run a few minutes after the job. It works, in that it sends an e-mail after checking that the event conditions are met, however it isn't automated so that it checks this without me setting a schedule against it.

Perhaps this may help you in your investigations....
Title: Re: Need a mail notification after cognos job failure
Post by: hespora on 16 Nov 2016 04:43:00 AM
Hi guys,


the way I do it:

- Set up a job that runs your tasks. Don't schedule the job.
- Set up an event studio agent that monitors an event that's always true (something like "[sales] <> 0")
- set up a task that executes the created job. in task execution rules, activate radio button "for selected events" with both "new events" and "ongoing events" checked
- set up a task that sends an email "job executed". in task execution rules, activate the same as above
- set up a task that sends an email "job failed". in task execution rules, activate radio button "when the agent or any of its tasks fail"
- now, schedule that agent to run at your job's desired frequency.

Much simpler than monitoring audit database. ;)
Title: Re: Need a mail notification after cognos job failure
Post by: hespora on 16 Nov 2016 04:49:42 AM
Forgot to add: Now I don't know whether this is an issue with my org's instance of Cognos, or if it's a general Cognos issue, but my IT has informed me that if a report is fired through an event (rather than through a job or schedule), apparently the entire job queue is not being load balanced if you have multiple application servers. So you may want to monitor that if you start executing huge workloads through events.
Title: Re: Need a mail notification after cognos job failure
Post by: Dev1975 on 12 Jan 2017 04:38:59 AM
Hi all,

Does anyone know how to setup an EventStudio agent to send out a failure e-mail if the job is stuck in a "QUEUED" state? Or is there a way of setting a "timer" within the agent to send out a failure notification if nothing has happened after (e.g.) 90 minutes?

Much appreciated.
Title: Re: Need a mail notification after cognos job failure
Post by: hespora on 12 Jan 2017 07:13:59 AM
Not me. For that, I suspect really that the audit database needs to be monitored.