欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

OpenNMS分布式部署 博客分类: 网络管理 opennms 分布式部署 

程序员文章站 2024-03-12 10:56:14
...
准备条件
            opennms-1 (192.168.1.22)        opennms-2 (192.168.1.23)
                ip1.txt                         ip2.txt
                requisition-1                   requisition-2
OpenNMS         安装                              安装
Postgresql      安装
httpd           安装

--------------------------------------------------------------
Newts           192.168.1.21



1 启用一个httpd
添加两个设备IP地址集合文件
vi /var/www/html/ip1.txt,内容如下,opennms-1管理的设备
123.127.197.66
202.106.57.226

vi /var/www/html/ip2.txt,内容如下,opennms-2管理的设备
202.106.42.46


2 配置 Provisioning Requisitions
Configure OpenNMS -> Manage Provisioning Requisitions
    Add Requisition -> 添加 requisition-1 (opennms-1)
                            requisition-2 (opennms-2)



3 配置设备发现
Configure OpenNMS -> Configure Discovery
    Foreign Source: 选择requisition-1
    
    Include URLs: 添加http://192.168.1.22/ip1.txt



4 数据采集配置
vi etc/opennms.properties
修改
# findByServiceType query
# org.opennms.dao.ipinterface.findByServiceType=select distinct ipIf from OnmsIpInterface as ipIf join ipIf.monitoredServices as monSvc where monSvc.serviceType.name = ?
改为
org.opennms.dao.ipinterface.findByServiceType=select distinct ipInterface from OnmsIpInterface as ipInterface join ipInterface.monitoredServices as monSvc where monSvc.serviceType.name = ? and ipInterface.node.foreignSource = 'requisition-1'



5 配置服务轮询
vi etc/poller-configuration.xml,修改package的name为example1的
<filter>IPADDR != '0.0.0.0'</filter>
修改为
<filter>IPADDR != '0.0.0.0' & foreignSource = 'requisition-1'</filter>

注意:& 的转义字符为 &



6 其它问题

opennms-2开启VacuumdOpenNMS分布式部署视频

OpenNMS视频地址:https://edu.csdn.net/course/play/6256/118507
OpenNMS视频下载:https://pan.baidu.com/s/1k2QdWxBqrN9nhWLIKLIrTQ