Re: Debugging email notifications in version 19.1.0-1
"Hernandez, Paul" <[email protected]> Fri, 3 Aug 2018 14:52:23 +0000
| Newsgroups | gmane.network.opennms.general |
|---|---|
| Message-ID | <[email protected]> |
Thank you for your time Michael.
- Yes my Notice List is in fact empty, for my account and the admin account, which are both set up to receive notifications.
I see: "You have no outstanding notices" and "There are 851 outstanding notices"
- Interesting that the name="Authentication Failed" clause is missing as I assumed that was part of the default config from the way the docs were written. I will add that one.
- however this one should be sending many notifications notifications.xml:
.
.
.
<notification name="Service Down" status="on">
<uei>uei.opennms.org/nodes/nodeLostService</uei>
<rule>(IPADDR IPLIKE *.*.*.*) & (isstaleNFS )</rule>
<destinationPath>Email_paulh</destinationPath>
<text-message>Service down</text-message>
<subject>Notice #%noticeid%</su:bject>
<numeric-message>111-%noticeid%</numeric-message>
</notification>
.
.
.
- the destinationPaths.xml: (I set up email defs in both my account and the "admin" account)
<destinationPaths xmlns="http://xmlns.opennms.org/xsd/destinationPaths">
<header>
<rev>1.2</rev>
<created>Thursday, August 2, 2018 8:28:11 PM GMT</created>
<mstation>localhost</mstation>
</header>
<path name="Email-Admin" initial-delay="null">
<target>
<name>admin</name>
<autoNotify>on</autoNotify>
<command>javaEmail</command>
</target>
<target interval="0m">
<name>Admin</name>
<autoNotify>on</autoNotify>
<command>javaEmail</command>
</target>
</path>
<path name="Email_paulh" initial-delay="null">
<target>
<name>paulh</name>
<autoNotify>on</autoNotify>
<command>javaEmail</command>
</target>
</path>
</destinationPaths>
- users.xml:
<userinfo xmlns="http://xmlns.opennms.org/xsd/users">
<header>
<rev>.9</rev>
<created>Thursday, August 2, 2018 6:10:18 PM GMT</created>
<mstation>master.nmanage.com</mstation>
</header>
<users>
<user>
<user-id>admin</user-id>
<full-name>Administrator</full-name>
<user-comments>Default administrator, do not delete</user-comments>
<password salt="true">aOLnvp4zHzsJVffnZGVJvXsIJv0xjbojAHolF+xc7KTAiS5BpLFXIUdyUeS26XEt</password>
<contact type="email" info="[email protected]"/>
<contact type="pagerEmail" info=""/>
<contact type="xmppAddress" info=""/>
<contact type="microblog" info=""/>
<contact type="numericPage" info="" serviceProvider=""/>
<contact type="textPage" info="" serviceProvider=""/>
<contact type="workPhone" info=""/>
<contact type="mobilePhone" info=""/>
<contact type="homePhone" info=""/>
<role>ROLE_ADMIN</role>
</user>
<user>
<user-id>paulh</user-id>
<full-name>Paul LastName</full-name>
<user-comments></user-comments>
<password salt="true">mSFxv+XJbyhpts1Y3csDUmERawDtbamgMbNK3KSmblAlOQvWKIVb5ZQPyG7smk1x</password>
<contact type="email" info="[email protected]"/>
<contact type="pagerEmail" info=""/>
<contact type="xmppAddress" info=""/>
<contact type="microblog" info=""/>
<contact type="numericPage" info="" serviceProvider=""/>
<contact type="textPage" info="" serviceProvider=""/>
<contact type="workPhone" info=""/>
<contact type="mobilePhone" info=""/>
<contact type="homePhone" info=""/>
<role>ROLE_ADMIN</role>
</user>
<user>
<user-id>rtc</user-id>
<full-name>RTC</full-name>
<user-comments>RTC user, do not delete</user-comments>
<password>68154466F81BFB532CD70F8C71426356</password>
<role>ROLE_RTC</role>
</user>
</users>
</userinfo>
You did not address why DEBUG did nor gen any errors in notifd.log?
Hope you see something incorrect.
-Paul
P.S. Added the missing clause defining "Authentication Failed" mentioned above, restarted onms, forced an incorrect PW and no notification was sent.
From: Seibold, Michael [mailto:[email protected]]
Sent: Thursday, August 2, 2018 11:22 PM
To: General OpenNMS Discussion <[email protected]>
Subject: Re: [opennms-discuss] Debugging email notifications in version 19.1.0-1
Hi Paul,
Your javamail-configuration.properties config seems to be correct. What is your destinationPaths.xml looking like? We add dummy users to define the mail destinations.
To debug - when you go to the Notification List and klick on the notification that should have been sent - at the bottom there should be some lines like
Users Notified
Sent To
Sent At
Media
Contact Info
[email protected]<mailto:[email protected]>
01.08.2018 09:44:28
javaEmail
Your config should be something like
notifications.xml:
<notification name="Authentication Failed" status="on" writeable="yes">
<uei>uei.opennms.org/internal/authentication/failure</uei>
<destinationPath>NotifyMe</destinationPath>
<text-message>Paul forgot his password</text-message>
<subject>Authentication failed</subject>
<numeric-message>9999</numeric-message>
</notification>
destinationPaths.xml:
<path name="NotifyMe" initial-delay="0s">
<target interval="0m">
<name>Paul</name>
<autoNotify>on</autoNotify>
<command>javaEmail</command>
</target>
</path>
users.xml:
<user>
<user-id>Paul</user-id>
<full-name>Paul, that's me</full-name>
<user-comments>OpenNMS Admin</user-comments>
<password salt="false">xxxxxxxxxxxxxxx</password>
<contact type="email" info="[email protected]<mailto:[email protected]>"/>
<contact type="pagerEmail" info=""/>
<contact type="xmppAddress" info=""/>
<contact type="numericPage" info="" serviceProvider=""/>
<contact type="textPage" info="" serviceProvider=""/>
</user>
-Michael
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ
opennms-discuss mailing list
To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-discuss