openNMS-更改现有的目标路径

时间:2018-11-30 21:50:06

标签: opennms

我已经问过Google教授,并花了几个小时来研究不同的openNMS文档,但是我似乎找不到我认为应该很简单的东西。我们正在生成警报并将其发送到多个组。我们想要更改现有警报的通知。如果我了解警报/通知的过程,则需要为该特定警报修改目标路径,然后在每个受影响的节点上进行猜测。  使用什么方法修改而不创建现有的警报目标路径?如果单击目标系统,然后转到警报,则会看到页面w。名称描述规则目标路径Varbinds操作的标头。在“操作”下是每个通知事件的“编辑”键。我猜这将是要采取的途径,但是其他没有经验的人说我们需要手动修改xml文件。我担心的是,不幸的是我们没有测试环境,而最初设置openNMS的人早已不在了。不用说我不愿意更改某些东西,甚至不愿单击随机按钮,因为我担心会破坏某些东西。当然,我不希望我的下一份工作是我说“你想要炸薯条吗?”

1 个答案:

答案 0 :(得分:0)

您应该检查destinationpaths.xml / notifications.xml

如果要删除正在发送的不需要的组,则应检查/ opt / opennms / etc /

中的destinationpaths.xml文件。

Notification.xml / destinationpaths.xml / notificationCommand.xml是通知中包含的WRT,并且事件定义应该存在于/ opt / opennms / etc / events /和/opt/opennms/etc/event.conf

下面的示例应该有帮助

Notifications.xml文件片段

    <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文件片段

    <path name="{Group-Name"} initial-delay="0s">
            <target interval="0s">
                <name>asdf.123@gmail.com</name>
                <autoNotify>on</autoNotify>
                <command>email</command>
            </target>
        </path>