windows SNMP:创建自定义 OID

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3458138/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 15:01:04  来源:igfitidea点击:

SNMP: Create custom OID

c#windowswindows-xpsnmp

提问by Flynn

I need custom OIDs for monitoring some of my software states. But I just can't understand: how can I create custom OID (like .1.3.6.1.4.1.30891.100.103) in Windows XP system? I need few of them to write there some info and read it when needed but I have no idea how to create them in the system.

我需要自定义 OID 来监控我的一些软件状态。但我就是不明白:如何在 Windows XP 系统中创建自定义 OID(如 .1.3.6.1.4.1.30891.100.103)?我需要很少的人在那里写一些信息并在需要时阅读它,但我不知道如何在系统中创建它们。

采纳答案by Lex Li

You should do this by writing an extension of Windows SNMP agent. The following article shows how,

您应该通过编写 Windows SNMP 代理的扩展来做到这一点。下面的文章展示了如何,

http://www.codeproject.com/KB/IP/SNMP_Agent_DLL__Part1_.aspx

http://www.codeproject.com/KB/IP/SNMP_Agent_DLL__Part1_.aspx

回答by Bruno

There are a few options to register OIDs, including:

有几个选项可以注册 OID,包括:

In both cases, this defines a prefix and you can do what you want with the rest of the tree.

在这两种情况下,这都定义了一个前缀,您可以对树的其余部分做您想做的事情。

I'd suggest reading this as well if you're not sure what to choose: http://www.oid-info.com/faq.htm(more specifically "How to get an OID assigned?").

如果您不确定选择什么,我建议您也阅读本文:http: //www.oid-info.com/faq.htm(更具体地说,“如何分配 OID?”)。