cancel
Showing results for 
Search instead for 
Did you mean: 

We want to create Event which can alert Sap jobs if fails or killed or canceled.

Former Member
0 Kudos

Hi Folks,

We are using Redwood cronacle 9.0.4.1 and want to add alerting in form of Events like whenever jobs get failed, killed or canceled. That event will raise which we add in chain definition. So that will call the event definition which has the email id for that particular team. Example: So, whenever my job fail A failed it has the Raise Event so it will trigger and the definition of the event and it has mail id of the team. But how I can create that chain definition for Event.

Accepted Solutions (0)

Answers (2)

Answers (2)

gmblom
Active Contributor
0 Kudos

Hello,

As mentioned above

Have a look at the log files of the System_Mail_Send job inside your alert chain to figure out if there are any setup issues and why the mail is not sending

Regards Gerben

Former Member
0 Kudos

As per logs of System_Mail_Send I am getting below error.

"Send an e-mail using SMTP. If the server parameter is not set, the value set by System_Mail_Configure is used. If server is set to 'default', then the default server for your application server is used. If server is set to 'detect' then the job will detect the server to be used from the first e-mail address. Other values for server specify a local SMTP server. This job definition requires the Mail Module license."

And as per log file it is asking for the configure System_Mail_Configure details. But we dont have any SMTP server configure will it be possible to do it without SMTP server

gmblom
Active Contributor
0 Kudos

Have a look at the documentation on mail on how configure the email setup

https://docs.runmyjobs.cloud/9.2.10/MailModule

Regards Gerben

Former Member
0 Kudos

Hi Gerben,

Thanks for this article I will check this and set up SMTP for email alerting. I was also trying to create Job Definition for mailing purpose it is also asking for SMTP Server. I will setup this SMTP and let you know whether it is working or not.

Thank you for your help. I appreciate it. I am willing to learn new things in Redwood. Could you please share the link for Redwood scripting so I can get the knowledge on that.

gmblom
Active Contributor
0 Kudos

Hello,

It is probably easiest to create an Event + Notification chain per email address. Then just raise the correct event for the group you want to notify.

Regards Gerben

Former Member
0 Kudos

Could you please elaborate it. I have created simple event definition in which I just given the name and Created chain in which I have added this event definition name which will trigger the event, but it must have the chain definition which have email id that logic I am missing here.

Former Member
0 Kudos

Thanks, Garben for your reply on this.

Currently I am following this steps:

Using Events

  1. Create an event
    1. Choose "Definitions > Event Definitions" in the Navigation bar.
    2. Choose New Event Definition and fill in a name.
    3. Choose Save and Close.
  2. Attach an event to be raised by the job chain.
    1. Choose "Definitions > Job Chains"
    2. From the context-menu, choose Edit.
    3. Choose the job chain.
    4. Choose the Raise Events tab and choose Add, choose the previously created event.
    5. Choose Save to save the job chain.
  3. Attach an event to submit the job chain.
  1. Choose "Definitions > Job Chains"
  2. From the context-menu, choose Edit.
  3. Choose the job chain.
  4. Choose the Wait Events tab and choose Add, choose the previously created event.
  5. Choose Save to save the job chain.

But the missing thing is what kind of logic I can add in 3rd steps like I wanted to through email when my job chain gets failed, error or killed. So which Job definition I can use here for the 3rd step and I am using SAP_Abaprun Job definition for batch job in step2

gmblom
Active Contributor
0 Kudos

Hello,

In that case you could add a System_RaiseClearEvent in the next step. Alternatively you make a duplicate of SAP_AbapRun with the inclusion of the raise event on Error. From RunMyJobs version 9.2.9 there is also the ability to raise events from the chain level here.

Regards Gerben

Former Member
0 Kudos

Hi Garben,

I have created Event definition in which I have just given the name rest of the things are blank.

I have created job chain in which I want to use Job definition which will trigger the email just wanted to know which job definition I can user here to get email alert could you please help on this. Along with this I have added the NewTestAlert as Wait Events which will trigger this NewTestAlert and this chain will run and send alert. After this I have created many chain definition fo SAP Batch jobs in that chain I will use Raise Events for canceled,error and Killed so whenever chain gets in canceled, killed and error status that time I will get email alert for these chains.

I can add more screenshots in next commnets if required

gmblom
Active Contributor
0 Kudos

Hello,

On the wait event on the chain, just make sure to set the Auto Submit to Always. Now any time the event gets triggered, your alert chain will start.

Regards Gerben

Former Member
0 Kudos

Hi Garben, selected that and now chain is running perfectly but I am not able get email on my mail id. As I am using System_Mail_Send job definition to send a mail. Is there any job definition I can use here to trigger a mail on respective email id.

gmblom
Active Contributor
0 Kudos

Hello,

Have a look at the log files of the System_Mail_Send job to figure out if there are any setup issues.

Regards Gerben

Former Member
0 Kudos

Hi Gerben, I have created Event Definition and Notification chain but the missing link is that I am not aware which Definition I can user to trigger mail like here I am using System_Mail_Send and we havent configured System_Mail_Send definition. Is there any othere definition we can use here in Notification chain instead of System_Mail_Send. As I can see Normal chain which has Raise_Event is working fine and calling notification chain but it we are not getting mail.