SNMP Monitor

转载 2007年09月25日 15:19:00

转自http://www.opennms.org/index.php/SNMP_Monitor

In order to use the SNMP monitor to check out values for particular SNMP OIDs, you'll need to first configure capsd-configuration.xml to discover the service, and then configure the poller to monitor the service.

为了利用SNMP监视功能来检测SNMP OID对象的实际数值,你需要首先配置capsd-configuration.xml,然后配置要被监测的端口.

The normal SNMP plugin looks like this:

通常的SNMP插件如下所示:

        <protocol-plugin protocol="SNMP" class-name="org.opennms.netmgt.capsd.SnmpPlugin" scan="on" user-defined="false">
                <property key="timeout" value="2000"/>
                <property key="retry" value="2"/>
        </protocol-plugin>

Suppose you wanted to make sure at least one user was logged into a system at an time. You could use hrSystemNumUsers (.1.3.6.1.2.1.25.1.5.0) to test this:

假设你想要明确在某一时刻最后一个登录系统的用户,你可以使用hrSystmNumUsers(.1.3.6.1.2.1.25.1.5.0)进行如下的测试:

        <protocol-plugin protocol="NumUsers" class-name="org.opennms.netmgt.capsd.SnmpPlugin" scan="on" user-defined="false">
                <property key="timeout" value="2000"/>
                <property key="retry" value="2"/>
		<property key="vbname" value=".1.3.6.1.2.1.25.1.5.0"/>
        </protocol-plugin>

This plugin will test if the OID exists, and if so it will assign the NumUsers service to the IP address. You can also test for a specific value (vbvalue). This would be useful if there is an OID that indicates if a service is active, such as ipForwarding that indicates a device is a Router:

        <protocol-plugin protocol="Router" class-name="org.opennms.netmgt.capsd.SnmpPlugin" scan="on" user-defined="false">
                <property key="vbname" value=".1.3.6.1.2.1.4.1.0"/>
                <property key="vbvalue" value="1"/>
                <property key="timeout" value="2000"/>
                <property key="retry" value="2"/>
        </protocol-plugin>

Once the service has been discovered, a monitor can be added to poller-configuration.xml. Again, the default monitor looks like this:

                <service name="SNMP" interval="300000" user-defined="false" status="on">
                        <parameter key="retry" value="2"/>
                        <parameter key="timeout" value="3000"/>
                        <parameter key="port" value="161"/>
                        <parameter key="oid" value=".1.3.6.1.2.1.1.2.0"/>
                </service>

For the NumUsers service to see if at least one person is logged in:

                <service name="NumUsers" interval="300000" user-defined="false" status="on">
                        <parameter key="retry" value="2"/>
                        <parameter key="timeout" value="3000"/>
                        <parameter key="port" value="161"/>
                        <parameter key="oid" value=".1.3.6.1.2.1.25.1.5.0"/>
                        <parameter key="operator" value="&gt;="/>
                        <parameter key="operand" value="1"/>
                </service>

Note that there are two new parameters: operator and operand. The operator can be one of:

  • Less than: "<" (you will need to use an entity &lt;)
  • Greater than: ">" (&gt;)
  • Less than or equals: "<=" (&lt;)
  • Greater than or equals: ">=" (&gt;=)
  • Equals: "="
  • Does not equal: "!="
  • Matches regular expression: "~"

The last value is used when the OID returns a string.

Be sure to add the monitor line at the bottom of the poller-configuration.xml file when adding new monitors:

        <monitor service="NumUsers"         class-name="org.opennms.netmgt.poller.monitors.SnmpMonitor"/>
 

相关文章推荐

Snmp实践与总结

Snmp实践与总结 一、Snmp简介    什么是SNMP SNMP:“简单网络管理协议”,用于网络管理的协议。SNMP用于网络设备的管理。SNMP的工作方式:管理员需要向设备获取数据,所以SNMP提...

snmp monitor

  • 2012-03-03 11:23
  • 2.20MB
  • 下载

ehcache-monitor-kit-1.0.1.zip

  • 2017-09-29 17:04
  • 3.92MB
  • 下载

多线程:C#线程同步lock,Monitor,Mutex,同步事件和等待句柄(上)

转自 http://www.cnblogs.com/freshman0216/archive/2008/07/27/1252253.html  本篇从Monitor,Mutex,ManualReset...

dubbo-monitor-simple-2.5.3-assembly

  • 2017-09-20 10:57
  • 18.21MB
  • 下载

lock,Monitor,Mutex的区别

网络上有一很多关于这三个的区别。但是个人的实验跟他们写的有一些出入。把个人的理解写出来,供大家拍砖。 http://www.cnblogs.com/bile/archive/2013/01/08/2...

dubbo-monitor-simple-2.5.3

  • 2017-09-19 14:50
  • 18.21MB
  • 下载

使用DBMS_MONITOR跟踪SQL

1.如何使用sql跟踪 在oracle 10g以前的版本中我们我们只能通过dbms_session包中的set_sql_trace过程、以及dbms_system包中的set_sql_tra...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

(最多只允许输入30个字)