XMPP Notification From OpenNMS

OpenNMS is a sophisticated and feature rich enterprise ready network monitoring solution (NMS). OpenNMS will monitor your systems via SNMP for performance information as well as availability by performing actual service requests such as HTTP requests. One of the most important features of any NMS is the ability to notify administrators when something has gone wrong either by e-mail, page, or some other means. OpenNMS supports a variety of notification methods (and you can add your own), and since version 1.2.1 this includes XMPP (aka "Jabber").

The configuration of XMPP notification is very simple assuming you have a functioning XMPP server (I strongly recommend Wildfire, formerly known as JIVE Messenger). You need to edit the xmpp-configuration.properties file in $OPENNMS_HOME/etc. This file contains three parameters: xmpp.server, xmpp.user, and xmpp.pass.

xmpp.server is the hostname of your XMPP server.

xmpp.user is the username (JID) that OpenNMS will use when connecting to the server.

xmpp.pass is the password that corresponds to the provided JID.

That is it! So the contents of this file might simply look like:

xmpp.server = gourd-amber.morrison.iserv.net
xmpp.user = opennms
xmpp.pass = thepassword

Obviously, since the password is provided in this file in plain text, you should ensure that the account used to authorize this connection has very limited privileges.

In the user configuration section of the "Admin" link (available in OpenNMS when you are logged in as a user posessing the administrative role) you can enter the user's JID in the "XMPP Address" field. This enables that user to receive XMPP notifications.

Note: It is important to recognize that the OpenNMS never is "present" as far as the XMPP service is concerned. It only sends messages. Therefore it will not appear in the roster of the users IM client, if the user is blocking messages from entities not on her or his roster/buddy-list then they will never see the messages from the OpenNMS service.

The last step in making all this work is that you must enable the "xmppMessage" command in the desired destination path(s). The configuration of "Destination Paths" is located within the "Configure Notifications" section of the "Admin" portion of the OpenNMS web interface. Simply select the notification path you want to generate the XMPP notices and make sure the "xmppMessage" command is highlighted in the commands multiselect widget.

Once XMPP messages are rolling out you will see messages in the notifd.log file like:

2006-01-05 02:45:41,244 DEBUG [Thread-598] ClassExecutor: Going for the class in stance: org.opennms.netmgt.notifd.XMPPNotificationStrategy
2006-01-05 02:45:41,244 DEBUG [Thread-598] ClassExecutor: org.opennms.netmgt.not ifd.XMPPNotificationStrategy class created: class org.opennms.netmgt.notifd.XMPP NotificationStrategy
2006-01-05 02:45:41,308 DEBUG [Thread-598] NotificationTask: command xmppMessage return code = 0

This is also the place to look if you don't believe your messages are getting through.

No comments:

Post a Comment