开发者

PHP MIB to OID resolve

I'm googling around for a couple of days, and can't find clear method/lib for resolving OID from MIB name, and MIB from OID.

I've found few sites that have a large MIB开发者_如何学JAVA database, search functions ie. but communicate with them needs cURL/socket connectivity and regexp of results (or eval in some cases)

I've tried to parse MIB files myself, but this is returning to writing language parser in php witch, is "madness" ;)

I have storage/cache mechanism witch work well, and every MIB lockup has to be done only once, but this one lockup must be fast and reliable

[EDIT] heh and forgot about clearing the point, is there any tool/lib/method fast and reliable to lockup MIBs and OIDs?


If you have net-snmp installed, and you can execute programs from your PHP script, you can use snmptranslate to go from a name to a mib:

snmptranslate -IR sysName.0

This tool depends on having your MIBDIRS and MIBS environment variables set, or supplying appropriate command arguments. (See man snmpcmd for details on the env vars and/or args.)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜