This article outlines the integration of Open NMS with Varius Message Router to send SMS alerts.
Please refer to Send SMS from external systems page to see other integration examples.
The concept involves configuring OpenNMS to send email messages to Varius Message Router as an email to SMS gateway. Varius Message Router will then convert the email contents to SMS.
Set the following configuration:
- SMTP server – IP address of Varius Message Router
- Sender email address – Email address of licensed user in Varius Message Router
- Recipient email address – The recipient email address format is <%recipient_mobile_number%>@fluidsms.com
We are assuming the following:
– IP address of Varius Message Router is 192.168.0.88
– The licensed user email address is firstname.lastname@example.org
– The mobile number is 91111111
1. Create new user
From the web GUI, click on Admin > Configure Users, Groups and On-Call Roles > Configure Users. Click “Add New User” and type “VMR” in the username field and provide a password in the form, then click “OK” to create a new user.
2. Key in new user email address
This will be in the format of <%recipient_mobile_number%>@fluidsms.com. For instance, if the recipient mobile number is 91111111, the email address will be email@example.com.
3. Create new Destination Path
To receive a notification from OpenNMS, your user or a user group must be a part of a destination path. Go to Admin, “Operations” section and select “Configure Notifications”. Select “Configure Destination Paths” and click “New Path”. Name it “VMRPath”, then click “Edit” and add “VMR” user then click “Next >>>”.
On the next page, leave the defaults (“javaEmail” and “on”) and click “Next >>>” and then “Finish” to save your new destination path in the “Existing Paths” section.
4. Associate events to new destination path
Associate OpenNMS events to our new destination path. Go to the Admin, “Operations” section and select “Configure Notifications”. Select “Configure Event Notifications” and click “Add New Event Notification” button at the top of the Event Notifications page. Select the event “OpenNMS-defined internal event: an authentication failure has occurred in WebUI” to test the setup. You can change this configuration later.
Click “Next >>>” and click “Skip results validation >>>” in the next page.
Fill in the following information used to send the notification and click “Finish”.
Name: Authentication Failed
Choose A Path: VMRPath
Text Message: The OpenNMS Web UI had a failed login attempt, by user ‘%parm[user]%’, from IP address %parm[ip]%
Short Message: Authentication failed by user ‘%parm[user]%’
Email Subject: Authentication failed by user ‘%parm[user]%’
Your notification event will be shown in the list with the status disabled. Set the radio button to “On” to enable it.
5. Enable Notifications
By default, notifications are disabled in OpenNMS. In the OpenNMS Admin page, change the radio button “Notification Status.” to “On” and click update.
6. Configure mail server
Configure the SMTP server of OpenNMS to point to Varius Message Router. Open $OPENNMS_HOME/etc/javamail-configuration.properties file and change the following.
# This is the e-mail address that OpenNMS puts in the “From” field:
Restart OpenNMS server.
7. Test your setup
You are now ready to create an OpenNMS event and receive a notification SMS message from Varius Message Router. Logout from OpenNMS web UI and try to login with an invalid account. You should receive an SMS notification.