How to configure email alerts of Bamboo errors
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Sometimes admin users need to monitor Bamboo errors.
Environment
6.6+
Solution
Bamboo uses log4j library from Apache which allows users to configure email notifications. To enable this option on Bamboo, follow the instructions below:
Stop Bamboo
Go to <bamboo-installation-directory>/atlassian-bamboo/WEB-INF/classes and edit the file log4j.properties
Add MAIL option to log4j.rootLogger. It should look like the following log4j.rootLogger=INFO, filelog, console, MAIL
Then, append to log4j.properties the following SMTP configuration:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#SMTP mail notifications log4j.appender.MAIL=org.apache.log4j.net.SMTPAppender log4j.appender.MAIL.BufferSize=1 log4j.appender.MAIL.SMTPHost=<your_SMTP_host> log4j.appender.MAIL.SMTPPort=<your_SMTP_port> log4j.appender.MAIL.SMTPUsername=<your_SMTP_username> log4j.appender.MAIL.SMTPPassword=<your_SMTP_password> log4j.appender.MAIL.From=<from_email> log4j.appender.MAIL.to=<to_email> log4j.appender.MAIL.Subject=<email_subject> log4j.appender.MAIL.layout=org.apache.log4j.PatternLayout log4j.appender.MAIL.layout.ConversionPattern=%d %p [%t] [%C{1}:%L] %m%n log4j.appender.MAIL.LevelRangeFilter.LevelMin=error log4j.appender.MAIL.LevelRangeFilter.LevelMax=fatal
ℹ️ Change everything between <> to your configurations.
Start Bamboo back
ℹ️ For more information about each parameter, please see Apache SmtpAppender documentation.
Was this helpful?