In OpenNMS, there are several ways for notification. This notification can be configured for such events, for example when one interface is down. In this time I would like to share configuration for email.
Configuration for email is like this:
1. After doing instalation for OpenNMS, here is the file of /etc/opennms/javamail-configuration.properties
################################################################################
# This file is the configuration for the the JavaMailer class. It is used to
# specify the details of the JavaMailer system properties
################################################################################
#
# Properties are defined but commented out indicating the default values.
#
#
# This property defines system sender account.
#
# The default setting is root@[127.0.0.1]
#org.opennms.core.utils.fromAddress=root@[127.0.0.1]
#
# These properties define the SMTP Host.
#
#org.opennms.core.utils.mailHost=127.0.0.1
#org.opennms.core.utils.mailer=smtpsend
#org.opennms.core.utils.transport=smtp
#org.opennms.core.utils.debug=true
#org.opennms.core.utils.smtpport=25
#org.opennms.core.utils.smtpssl.enable=false
#org.opennms.core.utils.quitwait=true
#
# This property controls the use of the JMTA, the default is true
#org.opennms.core.utils.useJMTA=true
#
# These properties define the Mail authentication.
#
#org.opennms.core.utils.authenticate=false
#org.opennms.core.utils.authenticateUser=”opennms”
#org.opennms.core.utils.authenticatePassword=”opennms”
#org.opennms.core.utils.starttls.enable=false
#
# These properties configure message content
#
#org.opennms.core.utils.messageContentType=text/plain
#org.opennms.core.utils.charset=us-ascii
2. In this time, I configure this notification using google mail (gmail). Change the file in the /etc/opennms/javamail-configuration.properties using this file (there are several lines are changed):
################################################################################
# This file is the configuration for the the JavaMailer class. It is used to
# specify the details of the JavaMailer system properties
################################################################################
#
# Properties are defined but commented out indicating the default values.
#
#
# This property defines system sender account.
#
# The default setting is root@[127.0.0.1]
org.opennms.core.utils.fromAddress=root@[127.0.0.1]
#
# These properties define the SMTP Host.
#
org.opennms.core.utils.mailHost=smtp.gmail.com
org.opennms.core.utils.mailer=smtpsend
org.opennms.core.utils.transport=smtp
org.opennms.core.utils.debug=true
#org.opennms.core.utils.smtpport=25
#org.opennms.core.utils.smtpssl.enable=false
#org.opennms.core.utils.quitwait=true
#
# This property controls the use of the JMTA, the default is true
org.opennms.core.utils.useJMTA=true
#
# These properties define the Mail authentication.
#
#org.opennms.core.utils.authenticate=false
#org.opennms.core.utils.authenticateUser=”opennms”
#org.opennms.core.utils.authenticatePassword=”opennms”
#org.opennms.core.utils.starttls.enable=false
#
# These properties configure message content
#
#org.opennms.core.utils.messageContentType=text/plain
#org.opennms.core.utils.charset=us-ascii
3. Restart OpenNMS, and then we can check the notification on our email when some events are happen.