简体   繁体   English

是否有用于通过 SNMP 进行通信的设备的通用 object 标识符?

[英]Is there a universal object identifier for equipment communicating over SNMP?

I have been tinkering around with snmp recently as a means to monitoring various equipment on a LAN.我最近一直在修补 snmp 作为监视 LAN 上各种设备的一种方法。 The protocol itself is fairly straightforward and I have been using the net-snmp module in node js and have no problem connecting and communicating with the various kit by various manufacturers on the LAN.该协议本身相当简单,我一直在 node js 中使用 net-snmp 模块,并且在局域网上与各种制造商的各种套件连接和通信没有问题。

As not all the equipment is made by the same manufacturer I am having to use specific object identifiers (oids) for each manufacturer to get a response that the item is on-line and available for communication.由于并非所有设备都由同一制造商制造,因此我必须为每个制造商使用特定的 object 标识符 (oids) 以获得该项目已在线并可用于通信的响应。 The problem I have is that each indivdual piece of equipment can at any time be removed, swapped or replaced by a different item at any time.我遇到的问题是,每个单独的设备都可以随时被移除、交换或替换为不同的项目。 Therefore hard programming with various manufacturers oids is not really working without having my code looping through a list of each manufacturers unique oids to see if the equipment is present.因此,如果不让我的代码循环遍历每个制造商唯一的 oid 列表以查看设备是否存在,那么使用各种制造商的 oid 进行硬编程并不能真正起作用。 However if a new manufacturer's equipment is installed then it will obvioulsy be ignored until a responsive oid is added to my program.但是,如果安装了新制造商的设备,那么它显然会被忽略,直到将响应 oid 添加到我的程序中。

I have looked online extensively and cannot find a definitive answer as the best way to solve this.我在网上进行了广泛的查找,但找不到明确的答案作为解决此问题的最佳方法。

My question therefore, is there an oid that you can query for a response that is universal across all manufacturers that will respond with some sort of message, or should I persist with creating a collection of oids specific to the equipment on my network?因此,我的问题是,是否有一个 oid 可以让您查询所有制造商通用的响应,该响应会以某种消息进行响应,还是我应该坚持创建特定于我网络上设备的 oid 集合? Has anyone else out there come across this issue and how did you solve it?有没有其他人遇到过这个问题,你是如何解决的?

You can check SNMPv2-MIB sysDescr or sysObjectID to identify the vendor.您可以检查 SNMPv2-MIB sysDescr 或 sysObjectID 来识别供应商。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM