Page 1 of 1
Notification on macro failure?
Posted: Thu Oct 21, 2010 2:55 pm
by bts050
I have a macro scheduled to publish a series of models every hour, but often times the macro fails and I'd like to receive some kind of notification when it fails. There are about 10 macro steps (all publishes), and it fails at different points each time. Any thoughts on how to do set up notification on failure? Cognos Planning v8.4.2.
Re: Notification on macro failure?
Posted: Sun Jan 09, 2011 3:21 pm
by mce
Hi,
There is a table in Planning Store that stores the macro status information, such as failed, succeeded ...etc, as well as the macro error information if it errored.
- Create a Framework Manager package that points to this table, and publish it to Cognos 8 Connection.
- Then create Report Studio or Query Studio Report that displays the content of this table for Failed macros.
- Then create an Event Studio Event Job that checks this table and if finds any new errors, runs the report that you created and sends it in an email to a list of people.
- Then schedule the Event Studio Job to run every 1 hour, so that it will check every hour if there is any new errors and will send the email accordingly.
This approach works well.
Kind regards,
Re: Notification on macro failure?
Posted: Tue Feb 15, 2011 4:40 pm
by usagimd
To minimize errors while publishing (in Analyst) use a step called "Delay" with around 10 seconds, depending on the size of the cube that is going to be published.
Look if this fits your need for notification without causing problems in the project (considering you are Publishing with Analyst):
1 - Create a .bat file to write a .txt, using one param that you can call "PublishingCube" or something like that.
2 - After each publish step on the macro place a step for a macro execution calling the macro of the step 1 of this post and the name of the last cube published.
3 - Create an event on Event Studio to send an e-mail notifying about the error, schedule it to run by trigger.
4 - Create another .bat to test the .txt created with the first .bat file testing if all cubes where published, if not, trigger the event to send an e-mail.
5 - On the event scheduled for one hour add another step to run the second .bat file after the publish (I don't know if you can run a macro directly from events but if not, you can call a macro from Analyst).
I'm looking for something to help you with the second .bat file maybe till there i'll be able to see id it'll help if it won't I won't post
Re: Notification on macro failure?
Posted: Tue Feb 15, 2011 4:42 pm
by usagimd