openNMS - change existing destination path

268 Views Asked by At

I've asked Professor Google, and spent a couple hours going through different openNMS docs, but I can't seem to find what I think should be fairly simple. We have alerts being generated and sent to multiple groups. We want to change the notifications for an existing alert. If I understand the procedure for alerts/notifications, the destination path needs to be modified for that specific alert, and I guess on every affected node. What method is used to modify, not create an existing alert destination path? If I click on a target system, then walk to the alert, I see a page w. headers of Name Description Rule Destination Path Varbinds Actions. Under Actions is an Edit key for each notifcation event. I'm guessing that would be the route to take, but someone else who's just as inexperienced said that we need to manually modify an xml file. My concern is that we don't have test environments unfortunately, and the person who set up openNMS initially is long gone. Needless to say I'm reluctant to change things, or even click on random buttons, for fear that I may break something. And of course I don't want my next job to be one where I say "Would you like fries with that?"

1

There are 1 best solutions below

1
Sriraag On

You should check the destinationpaths.xml/notifications.xml

If you want to remove unwanted group being sent the email you should check destinationpaths.xml file in /opt/opennms/etc/

Notification.xml/destinationpaths.xml/notificationCommand.xml are interralated WRT to notificaitons also the event definition should exist in /opt/opennms/etc/events/ and in /opt/opennms/etc/event.conf

Below Example should help

Notifications.xml file snippet

    <notification name="Test notification for Stack Overflow" status="on">
     <uei>{event UEI that you want to configure}</uei>
      <rule>(IPADDR IPLIKE *.*.*.*)</rule>
      <destinationPath>{Group-Name}</destinationPath>
      <text-message>%nodelabel% %interface% %parm[1]% %parm[exceptionMessage]% %parm[all]%</text-message>
      <subject>Notice #%noticeid%</subject>
      <numeric-message>111-%noticeid%</numeric-message>
    </notification>

destinationpaths.xml file snippet

    <path name="{Group-Name"} initial-delay="0s">
            <target interval="0s">
                <name>[email protected]</name>
                <autoNotify>on</autoNotify>
                <command>email</command>
            </target>
        </path>