Notification Commands

A notification command is a named, reusable execution profile for a Java class or external program command used to convey notices to targets. Meridian includes several default notification commands. You can create custom commands to send notifications to a platform of your choice.

Default notification commands

callHomePhone, callMobilePhone, and callWorkPhone

Ring one of the phone numbers configured in the user’s contact information. All three commands are implemented using the in-process Asterisk notification strategy, and differ only by which contact field the command uses.


Conveys a notice to an instance of the IRCcat Internet Relay Chat bot. Implemented by the in-process IRCcat notification strategy.

javaEmail and javaPagerEmail

By far the most commonly used commands, these deliver a notice to a user’s email or pagerEmail contact field value. By configuring a user’s pagerEmail contact field value to target an email-to-SMS gateway, you can easily configure SMS notifications. Both commands use the in-process JavaMail notification strategy for implementation.

microblogDM, microblogReply, and microblogUpdate

Sends a notice to a user as a direct message, at a user via an at reply, or to everybody as an update via a microblog service with a Twitter v1-compatible API. A separate, in-process notification strategy implements each command.

numericPage and textPage

Sends a notice to a user’s numeric or alphanumeric pager. Implemented as an external command using the qpage utility.

xmppGroupMessage and xmppMessage

Sends a message to an XMPP group or user. Implemented with the in-process XMPP notification strategy.

Custom notification commands

Edit the ${OPENNMS_HOME}/etc/notificationCommands.xml file to customize and extend notification commands.

Use external binary notification commands sparingly as they spawn additional process threads on your core Meridian system.

Custom command configuration

The streamed attribute dictates whether the substitution text and switch text (or both) will be placed in the command line or in the input stream when the command starts to run.

Place boilerplate arguments
   <argument streamed="false">
Place dynamic values
   <argument streamed="false">
When you combine the two (substitution and switch), each is written as a separate argument in the command line. For example,


   <argument streamed="false">
Translates to:
   -Dnodeid= 8
and not:

Valid switches from the NotificationManager class

The NotificationManager class defines some special switches, providing data for the class or command that runs.

Internal Name Switch Name Source



From notification definition



From user profile



From user profile



From original event



From user profile



From user profile



From original event



From notification definition



From user profile



From user profile



From notification definition



From original event



From notification definition



From notification definition



From user profile



From user profile



Binary yes or no



From user profile



From user profile



From user profile

Extended dynamic values

You can pass arbitrary parameters from the notification to the notificationCommand via the <parameter> tag, which can then be used as required.



This configuration sends an OpenNMS trap to an external system with the nodelabel in the varbind.

    <notification name="snmpTrap" status="on">
        <rule>IPADDR IPLIKE *.*.*.*</rule>
                All services are down on node %nodeid%.
        <subject>node %nodeid% down.</subject>
        <parameter name="trapVersion" value="v1" />
        <parameter name="trapTransport" value="UDP" />
        <parameter name="trapHost" value="" />
        <parameter name="trapPort" value="162" />
        <parameter name="trapCommunity" value="public" />
        <parameter name="trapEnterprise" value="." />
        <parameter name="trapGeneric" value="6" />
        <parameter name="trapSpecific" value="1" />
        <parameter name="trapVarbind" value="Node: %nodelabel%" />

The parameters defined here are passed to the notification command as switches. You will see these in the notificationCommands.xml file:

    <command binary="false">
        <comment>Class for sending notifications as SNMP Traps</comment>
        <argument streamed="false">
        <argument streamed="false">
        <argument streamed="false">
        <argument streamed="false">
        <argument streamed="false">
        <argument streamed="false">
        <argument streamed="false">
        <argument streamed="false">
        <argument streamed="false">

You can define any or none of these parameters and switches. However, if you define a parameter in the notification, you must also define a corresponding switch in the notification command. The defaults are as follows:

trapVersion="v1" ("v1 or "v2c")
trapTransport="UDP" (only UDP for now)
trapHost="" (any valid hostname or ip address)
trapPort="162" (any valid IP port)
trapCommunity="public" (any valid community string)
trapEnterprise="." (any valid OID)
trapGeneric="6" (any valid generic ID)
trapSpecific="1" (any valid trapSpecific ID)
trapVarbind="OpenNMS Trap Notification" (any string or one or more valid %<event field>% such as "%eventUEI%" in the string)

The one allowed trap varbind will be sent with the object ID . and the object type DisplayString.