I have installed OpenNMS Horizon and configured notifcations as follows:
for testing purposes, I have configured a custom nodeDown event, which has the Email-Admin group on its destination path (My Node DOWN Alert; OpenNMS-defined node event: nodeDown; uei.opennms.org/nodes/nodeDown)
Current Rule:
(IPADDR != '0.0.0.0')
I have set up a gmail account in xxx as follows:
org.opennms.core.utils.useJMTA=false
org.opennms.core.utils.transport=smtps
org.opennms.core.utils.mailHost=smtp.gmail.com
org.opennms.core.utils.smtpport=587
org.opennms.core.utils.smtpssl.enable=true
org.opennms.core.utils.authenticate=true
org.opennms.core.utils.authenticateUser=XXX@gmail.com
org.opennms.core.utils.authenticatePassword=XXX
org.opennms.core.utils.starttls.enable=true
org.opennms.core.utils.messageContentType=text/html
org.opennms.core.utils.charset=us-ascii
org.opennms.core.utils.fromAddress=OpenNMS Administrator
Gmail is configured with setting allow less secure applications.
My Question:
When I am powering off my test machine, I can see a nodeDown event in the Horizon Dashboard. However, the system does not send an email notification.
According to notefid.log (/opt/opennms/logs/notifd.log) the system does not even try to send an email.
Changing the port to org.opennms.core.utils.smtpport=465 is not working either.
What am I missing? Please advise!
EDIT
Email is working properly with this configuration (/opt/opennms/etc/javamail-configuration.properties):
org.opennms.core.utils.useJMTA=false
org.opennms.core.utils.transport=smtps
org.opennms.core.utils.mailHost=smtp.gmail.com
org.opennms.core.utils.smtpport=465
org.opennms.core.utils.smtpssl.enable=true
org.opennms.core.utils.authenticate=true
org.opennms.core.utils.authenticateUser=xxx@gmail.com
org.opennms.core.utils.authenticatePassword=xxx
org.opennms.core.utils.starttls.enable=true
org.opennms.core.utils.messageContentType=text/html
org.opennms.core.utils.charset=us-ascii
org.opennms.core.utils.fromAddress=OpenNMS Administrator <xxx@gmail.com>
A scheduled outage prevented the system from sending emails. The scheduled outage did not vanish upon deletion. I had to add a second outage and then delete the first entry.
There are a number of reasons why e-mails can't be sent. In Step 4 you state that you have configured a custom nodeDown event (which I assume is different than the default nodeDown event). Verify that your custom notice is also enabled.
Your next step will be to edit /opt/opennms/etc/log4j2.xml
and scroll to the bottom. Set the log level for "notifd" to DEBUG. Then repeat your test and my guess is you will see an error in the log with connecting to GMail. Correct that and you should be good to go.