⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme

📁 opennms得相关源码 请大家看看
💻
字号:
-------------------------------------------------------------------------------- mib2opennms-- Author: Tomas Carlsson <tc@tompa.nu>-- http://tompa.nu/mib2opennms-- $Id: README 333 2003-02-07 01:16:29Z tarus $-------------------------------------------------------------------------------This utility can read data from a collection of SNMP MIBs and output all the NOTIFICATION-TYPEs in OpenNMS eventconf.xml format.It depends on libsmi (http://www.ibr.cs.tu-bs.de/projects/libsmi/),packages libsmi2 and libsmi2-dev on Debian.BUILD-----To compile run configure and make from the top level directory:    $ ./configure    $ make installTo change the default install location (/usr/local) add the "-璸refix=<path>"argument when running configure.RUNNING-------To run:    $ mib2opennms -f outputfile -m <MIB path list> MIB1 MIB2 ...for example:    > mib2opennms -f myfile.xml -m ~/.snmp/mibs:/usr/share/snmp/mibs \      CISCO-CCM-MIB CISCO-WIRELESS-IF-MIBNote that the MIB path must include the paths where all mentioned MIBsand their imported MIBs can be found.The MIBs to convert can either be given as MIB module names or filenames, i.ethe following command is possible:    > mib2opennms -f myfile.xml -m ~/.snmp/mibs:/usr/share/snmp/mibs \      ~/.snmp/mibs/CISCO-*and will convert all MIB files that starts with CISCO-.The output file is not a complete xml file but only <event> entries thatcan be pasted into eventconf.xml. The output looks like this:<event> <mask>  <maskelement>   <mename>id</mename>   <mevalue>.1.3.6.1.4.1.9.9.136.2.3.1</mevalue>  </maskelement> </mask> <uei>http://uei.opennms.org/traps/cwrTrapThresh</uei> <event-label>cwrTrapThresh</event-label> <descr><pre>The radio subsystem generates this trap when a threshold crossesits specified limit. The parameters identify the followingcwrThreshValue          - The value that was crossed.cwrThreshHysteresisTime - The Hysteresis time that was specified.cwrThreshLimitTime      - The Limit time that was specified.</pre>   cwrThreshValue=%parm[1]%<br>   cwrThreshHysteresisTime=%parm[2]%<br>   cwrThreshLimitTime=%parm[3]%<br> </descr> <logmsg dest='logndisplay'>cwrTrapThresh trap received </logmsg> <severity>Indeterminate</severity></event>SOME NOTES (added by Tarus):----------------------------If mib2opennms complains about a missing MIB, be sure that there is a filein your "-m" MIB path that has the *exact* name as the MIB it is complainingabout.For example, if it complains "Can't find RFC-1213" and you have a file inyour path called "RFC1213", you must rename it or copy it to "RFC-1213".The extensions .txt, .my and I believe .mib are acceptable, so in theabove example, RFC-1213.txt should work.Also, the <mevalue> for generic should almost always be "6", althoughmib2opennms usually sets it to "0".

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -