Configuration of Alerts to send email

Greetings,

I’m testing Camunda Optimize 3.8.3 with Camunda Platform 7.

I have some problems with the Alerts features in Optimize. I have configured the email in environment-config.yaml. I have attached a screenshot. I created an alert in Optimize and unfortunately, no email is sent, when the critical value in my report is reached. I would like to know, if i did something wrong or if there is something else to configure.
Alert_Email_Config

Secondly, what does the state “suspended” for process instance mean?

As far as i understand, when we talk about incidence in process instance, it is occured incidences/errors in the BPMN Model and/or source code. Am right?

I would be very grateful for your quick help.
Kind regards

Jayna

Hey @jayna7,

Thank you so much for your question! First and foremost I just realised that in the picture you uploaded there are some credentials written. In case these are your actual credentials, I would suggest to delete the image from the post.

In regards to the alert: I am actually not very sure why this happens but I can suggest checking if you can see the alert created on your UI when you open Optimize (or on the Elasticsearch). If the alert is there I assume that there is some problem with the configuration. You could share also some logs with me to assist you further.

In regards to suspended instances: Suspended instances are simply instances which have been stopped (it could be because as users we saw that there is something wrong with them for instance). The suspension can happen from Cockpit or for instance from an external API. You can read more about suspended instances here

Let me know if you have any more questions I could help you with.

Cheers,
Andrea

1 Like

Thank you for your answer Andrea. I can see the created Alert on my UI.

Maybe, there is indeed a problem with the configuration, but i don’t know where.

Another problem that i see: when i start optimize (demo.bat), i always have the message “Optimize didn’t start”. But i can still open it in my browser afterwards and everything works fine, except the Alert. Look at the screenshot.

Is this maybe the reason why, emails aren’t sent?

Hey @jayna7,

first of all I wanted to let you know that we removed the picture you had uploaded on your initial question and which included your login data. However, the picture had been up for more than 24hours and as the questions in this forum are public, it is possible that someone has seen your login data for your gmail so we would advice you to change your password immediately.

Unfortunately, I am not able to help you further unless we have a look at your logs. A blunt guess from my colleague is that the google smtp server requires a security protocol, which in your case is not configured as you have set it to NONE. There could be some other issue though, but if you see the alert being created successfully on you UI, I would doubt it is an Optimize issue.

I hope this answer was helpful, please let me know if I can assist you further.

Cheers,
Andrea

Here is part of my Optimize log file.

14:49:44.951 [QuartzScheduler_Worker-10] ERROR o.c.o.s.a.EmailNotificationService - Was not able to send email from [you@gmail.com] to [you@gmail.com]!
org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.gmail.com:587
	at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1469)
	at org.apache.commons.mail.Email.send(Email.java:1496)
	at org.camunda.optimize.service.alert.EmailNotificationService.sendEmail(EmailNotificationService.java:89)
	at org.camunda.optimize.service.alert.EmailNotificationService.notifyRecipient(EmailNotificationService.java:44)
	at org.camunda.optimize.service.alert.EmailNotificationService.lambda$notify$0(EmailNotificationService.java:36)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at org.camunda.optimize.service.alert.EmailNotificationService.notify(EmailNotificationService.java:36)
	at org.camunda.optimize.service.alert.EmailNotificationService.notify(EmailNotificationService.java:32)
	at org.camunda.optimize.service.alert.AlertJob.fanoutNotification(AlertJob.java:147)
	at org.camunda.optimize.service.alert.AlertJob.handleAlertTriggered(AlertJob.java:100)
	at org.camunda.optimize.service.alert.AlertJob.execute(AlertJob.java:76)
	at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
Caused by: com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a STARTTLS command first. x1-20020adfdcc1000000b0021d63fe0f03sm14148692wrm.12 - gsmtp

	at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2267)
	at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1758)
	at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1257)
	at javax.mail.Transport.send0(Transport.java:255)
	at javax.mail.Transport.send(Transport.java:124)
	at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1459)
	... 12 common frames omitted
14:49:45.690 [QuartzScheduler_Worker-10] ERROR o.c.o.s.a.EmailNotificationService - Was not able to send email from [you@gmail.com] to [you@hotmail.de]!
org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.gmail.com:587
	at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1469)
	at org.apache.commons.mail.Email.send(Email.java:1496)
	at org.camunda.optimize.service.alert.EmailNotificationService.sendEmail(EmailNotificationService.java:89)
	at org.camunda.optimize.service.alert.EmailNotificationService.notifyRecipient(EmailNotificationService.java:44)
	at org.camunda.optimize.service.alert.EmailNotificationService.lambda$notify$0(EmailNotificationService.java:36)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at org.camunda.optimize.service.alert.EmailNotificationService.notify(EmailNotificationService.java:36)
	at org.camunda.optimize.service.alert.EmailNotificationService.notify(EmailNotificationService.java:32)
	at org.camunda.optimize.service.alert.AlertJob.fanoutNotification(AlertJob.java:147)
	at org.camunda.optimize.service.alert.AlertJob.handleAlertTriggered(AlertJob.java:100)
	at org.camunda.optimize.service.alert.AlertJob.execute(AlertJob.java:76)
	at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
Caused by: com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a STARTTLS command first. j10-20020a5d448a000000b0021d888e1132sm1032930wrq.43 - gsmtp

	at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2267)
	at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1758)
	at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1257)
	at javax.mail.Transport.send0(Transport.java:255)
	at javax.mail.Transport.send(Transport.java:124)
	at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1459)

I solved the problem. There was an error in my configuration. Thanks for your help.

1 Like