SNMP远程PING

假设我们有三台服务器A,B和C.A是我们的监控服务器。 我试图在服务器B上find一个OID来ping服务器C,以确定服务器C是否可以从服务器B的angular度访问。我在IBM Knowledge Center中find了这个OID。 LINUX中有这样做的OID吗?

提前致谢

最后,我使用了NET-SNMP-EXTEND-MIB,并且编写了一个以IP为参数的ping脚本。

snmpset -v2c -c public -m +NET-SNMP-EXTEND-MIB localhost 'nsExtendStatus."remotePing"' = createAndGo 'nsExtendCommand."remotePing"' = /etc/snmp/scripts/pingScript.sh 'nsExtendArgs."remotePing"' = 'google.com' 

不要忘记在/ etc / snmp / scripts下放置pingScript.sh文件。 在这里,我inputgoogle.com作为默认值,然后从我的程序我在运行时更改此文字与适当的IP地址。 通过获取nsExtendOutput1Table.nsExtendOutputFull可以读取ping时间或脚本返回的内容。