OpenNMS 与 Junos Space 网络管理平台的集成
从 Junos Space 网络管理平台 24.1R1 版开始,OpenNMS 不再与 Junos Space 网络管理平台捆绑在一起。您必须在单独的系统上安装 OpenNMS。
将 Junos Space 网络管理平台与 OpenNMS 集成后:
-
当您从 Junos Space 网络管理平台添加或删除任何设备时,设备列表将更新到 OpenNMS 数据库。
-
您可以在空间网络管理平台管理的设备上设置SNMP v3 OpenNMS IP陷阱目标。
-
与 OpenNMS 的 Junos Space 网络管理平台连接支持手册同步,以避免 Junos Space 网络管理平台和 OpenNMS 之间出现任何差异。
-
OpenNMS 与 Junos Space 网络管理平台的集成已通过 OpenNMS Horizon(版本:32.0.6)进行验证。
您必须从 OpenNMS 门户 安装、配置和获取 OpenNMS 许可证,因为该许可证未与 Junos Space 网络管理平台捆绑在一起。
有关 OpenNMS 安装和配置的详细信息,请参阅 OpenNMS 的安装和配置。
为确保 OpenNMS 与 Junos Space 网络管理平台正确集成,请在 OpenNMS 设置上执行以下过程:
要在 OpenNMS 中生成 SSL 证书,请参阅 使用 HTTPS 保护码头。这是生成 SSL 证书的示例命令
keytool -alias opennms-jetty -genkeypair -keyalg RSA -keysize 2048 -validity 731 -keystore /opt/opennms/etc/opennms.keystore注意:要识别 OpenNMS 主机名并获取正确的 CN 条目,请运行以下示例命令(使用安装 OpenNMS 的虚拟机的 IP 地址):
nslookup 10.204.250.150 Server: 66.129.233.81 Address: 66.129.233.81#53 Non-authoritative answer: 150.250.204.10.in-addr.arpa name = your-hostname-example.net. Authoritative answers can be found from:
CN :- OpenNMS HostName (Mandatory) Example :- What is your first and last name? (CN Entry) [Unknown]: your-hostname-example.net Is CN=your-hostname-example.net, OU=juniper, O=BND, L=kol, ST=wb, C=IN correct? [no]: yes
必须提供 OpenNMS 主机名作为 CN 条目。
VM 的 OpenNMS 主机必须允许 Junos Space 网络管理平台主机 IP 访问端口 8980、8443 和 162,以便启用 OpenNMS 与 Junos Space 网络管理平台之间的通信。
以下是用于打开端口的示例命令:
systemctl restart firewalld firewall-cmd --permanent --add-port=8980/tcp firewall-cmd --permanent --add-port=8443/tcp firewall-cmd --zone=public --add-port=162/udp --permanent systemctl reload firewalld
要在 trapd-configuration.xml 文件中进行更改,请将端口 162 用于 snmpv3 陷阱,并为 snmpv3 陷阱添加条目。有关更多详细信息,请参阅 管理 SNMPv3 陷阱配置。以下是示例输出:
<trapd-configuration xmlns="http://xmlns.opennms.org/xsd/config/trapd" snmp-trap-address="*" snmp-trap-port="162" new-suspect-on-trap="false" include-raw-message="false" threads="0" queue-size="10000" batch-size="1000" batch-interval="500"> <snmpv3-user security-name="junos_space" security-level="3" auth-passphrase="jnpr123!" auth-protocol="SHA" privacy-passphrase="jnpr123!" privacy-protocol="AES"/> </trapd-configuration>
从 Junos Space 网络管理平台 24.1R1 版开始,Junos Space 网络管理平台默认设置为 禁用所有设备的网络监控 。您必须从应用程序设置启用网络监控或在 JBoss VIP 节点上运行 sh /var/www/cgi-bin/network_monitoring_status.sh enable 命令。
登录到配置了 VIP 或 eth0:0 接口的 Junos Space 节点的 CLI。
此时将显示 Junos Space 设置菜单。
在 Junos Space 网络管理平台设置菜单提示符中输入 7 以运行 shell 命令。
以下是示例输出:
admin@10.206.41.183's password: Last login: Mon Aug 17 06:17:58 2015 from 10.206.41.42 Welcome to the Junos Space network settings utility. Initializing, please wait Junos Space Settings Menu 1> Change Password 2> Change Network Settings 3> Change Time Options 4> Retrieve Logs 5> Security 6> Expand VM Drive Size 7> (Debug) run shell A> Apply changes Q> Quit R> Redraw Menu Choice [1-7,AQR]: 7
系统会提示您输入管理员密码。
输入管理员密码。
通过在 JBoss VIP 节点上运行
sh /var/www/cgi-bin/OpenNMS_Setup.sh命令,通过 Junos Space 网络管理平台集成 OpenNMS 服务器。以下是群集环境中的示例输出:
Do you want to start the services automatically after finished applying the Changes for OpenNMS Connection?(y/n):y This is Cluster env, Do all nodes have same password for admin user?(y/n):y This is Cluster env, please enter password for admin user: start to configure OpenNMS in current server
根据您的设置提供 OpenNMS 的主机和证书详细信息。
注意:OpenNMS 主机 NameServer 在命令输出中 nslookup 返回信息。
OpenNMS 的 DNS 必须与第 1 点中的 CN 条目相同。
以下是示例输出:
Enter IP of OpenNMS host [Mandatory]: 10.204.250.150 Enter DNS of OpenNMS [Mandatory] : your-hostname-example.net Enter IP of OpenNMS host NameServer [Mandatory]: 66.129.233.81 Enter Port for HTTPS access [8443]: 8443 Enter User name of the OpenNMS admin user [admin]: admin
要启用与 OpenNMS 同步的限制:
注意:启用限制后,Junos Space 网络管理平台与 OpenNMS 之间的同步每小时进行一次。
建议启用限制,但在 Junos Space 网络管理平台管理超过 1000 台设备时必须启用限制。
以下是示例输出:
Do you want to enable throttling of sync to OpenNMS (Recommended for very high device count) ? (y/n):y Configuring and checking connectivity to OpenNMS.Please wait.... Credentials are valid.
如果您选择 Y 重新启动 JBoss,则所有节点上的服务都会停止并重新启动。
完成后,您可以登录到 Junos Space 网络管理平台 GUI 并使用 网络监控。
Junos Space 网络管理平台在“网络监控”窗口中提供了重定向至 OpenNMS 应用程序的选项。
如果选择 N,则必须在使用 网络监控之前在所有节点上手动重新启动 JBoss。
由于 OpenNMS 与 Junos Space 网络管理平台分离,因此如果要通过 OpenNMS 监控 Junos Space 节点,则必须手动添加节点。有关详细信息,请参阅 监控交换矩阵中的节点。
更新 OpenNMS 密码
如果修改了 OpenNMS 密码,请在 JBoss VIP 节点上运行 sh /var/www/cgi-bin/ChangeOpenNMSpassword.sh 命令以更新 OpenNMS 密码。
以下是示例输出:
**WARNING! Upon Completion of OpenNMS Pasword Change, JBoss Services will restart automatically on all the nodes. Do you want to continue?(y/n):y This is Cluster env, Do all nodes have same password for admin user?(y/n):y This is Cluster env, please enter password for admin user: start to configure OpenNMS in current server Enter OpenNMS New admin user password : Credentials are valid. Password Changed Successfully and Server restarting automatically!