snmp

Implementing a custom MIB in a PySNMP agent

五迷三道 提交于 2019-12-03 09:09:33
I'm having difficulty implementing a custom MIB in a PySNMP agent. I've started with: http://pysnmp.sourceforge.net/examples/4.x/v3arch/agent/cmdrsp.html created my own MIB file, used build-pysnmp-mib to make a Python module and successfully imported the symbol. I can't see where to go next. I need to somehow mount the imported symbol on the list of served MIBs and provide an implementation. (It's currently a MIB with one read-only INTEGER property.) The MIB file passes smilint without warnings, but I've had to manually add a missing MibScalar import to the generated module. MIB: TRS-MIB

Get Printer Status Using SNMP OID

匿名 (未验证) 提交于 2019-12-03 08:33:39
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am working with SNMP in Android. I want to get Printer Status. I am using Snmp4Android.jar and OID 1.3.6.1.2.1.25.3.5.1.1 . Please refer this link Printer Status . SnmpActivity.java here public class SnmpActivity extends Activity { private static String ipAddress = "PrinterIP" ; private static String port = "Port" ; private static String oidValue = "1.3.6.1.2.1.25.3.5.1.1" ; public static Snmp snmp ; public static CommunityTarget comtarget ; static PDU pdu ; static OID oid ; static VariableBinding req ; Button b ; private static

SNMPv3 to SNMPv2 glue layer

匿名 (未验证) 提交于 2019-12-03 07:36:14
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have been asked to install an HP OpenView agent onto a remote Unix platform to capture SNMP traps forwarded by a client application. I have since discovered that the client application can only forward SNMPv3 traps, and the agents we use can only accept SNMPv2 traps. I have discovered that I may be able to resolve this issue through the use of the Perl module NetSNMP::TrapReceiver but I am unclear how this is setup or how/if you can convert a v3 trap to a v2 trap. My goal is to capture the v3 trap and, hopefully via a script or tool,

How can I access ink levels of printers programmatically?

丶灬走出姿态 提交于 2019-12-03 06:25:19
问题 Okay, this is a Windows specific question. I need to be able to access the ink levels of a printer connected to a computer. Possibly direct connection, or a network connection. I recognize that it will likely be different for each printer (or printer company at least) but where can I find the information of how they reveal ink levels to a PC. Also, what is the best language to read this information in? 回答1: Okay, this is a OS agnostic answer... :-) If the printer isn't a very cheapo model, it

华三交换机snmp开通

狂风中的少年 提交于 2019-12-03 05:39:42
简介 SNMP协议的运用场景非常丰富,利用SNMP协议,网络管理员可以对网路上的节点进行信息查询、网络配置、 故障定位、容量规划,网络监控和管理,分为v1、v2c、v3 三个版本,其中V3最为安全,此处以v1、v2c为例 SNMP配置 进入系统视图 system-view 启用snmp协议 snmp-agent 允许snmp协议的相应版本 snmp-agent sys-info version v1 snmp-agent sys-info version v2c 配置交换机的读团体名为public snmp-agent community read public 配置管理员标识 snmp-agent sys-info contact administrator 配置设备位置 snmp-agent sys-info location office 允许发送trap报文 snmp-agent trap enable 配置trap主机地址(网关地址) snmp-agent target-host trap address udp-domain 172.10.1.6 params securityname public v1 保存 save 来源: https://www.cnblogs.com/longlogs/p/11780340.html

网络协议SNMP分析技术

怎甘沉沦 提交于 2019-12-03 04:37:38
内容一: 1. 打开Ethereal软件开始抓包, 输入命令: snmputil get [目标主机IP地址] public .1.3.6.1.2.1.1.2.0 停止抓包。对 SNMP包进行过滤。 2. 找出一对snmp协议请求包和相对应的应答包。给出抓包结果截图。 3.对上面这对请求和应答包进行分析,根据SNMP协议数据包格式填值。 请求包 报文分析 IP Source 字段值 10.30.10.150 Destination 字段值 10.30.10.134 UDP Source Port 字段值 1072 Destination Port 字段值 161 SNMP 版本 1 ( 0 ) 共同体 public PDU 类型 RESPONSE (2) 请求标识符 OXOOOOOOO1 差错状态 NO ERROR (0) 差错索引 0 OID 1.3.6.1.2.1.1.2.0 Value SNMPV2-SMI::ENTERPRISES.311.1.1.3.1.1 应答包 报文分析 IP Source 字段值 10.30.10.150 Destination 字段值 10.30.10.134 UDP Source Port 字段值 1072 Destination Port 字段值 SNMP(161) SNMP 版本 1 (0) 共同体 Public PDU 类型 GET (0)

How to get the name of the Oid (#Snmp)?

匿名 (未验证) 提交于 2019-12-03 02:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Ok, following the advice of Lex Li and I try to get Oid name using an other lib : #SnmpLib Here the sample : public static void Main(string[] args) { string oid = ".1.3.6.1.4.1"; IObjectRegistry registry = new ReloadableObjectRegistry(@"C:\Users\Fnizz\Desktop\MIBS_BARCO\"); IObjectTree tree = registry.Tree; var o = tree.Search(ObjectIdentifier.Convert(oid)); string textual = o.AlternativeText; Console.WriteLine(textual); if (o.GetRemaining().Count == 0) { Console.WriteLine(o.Definition.Type.ToString()); } Console.ReadKey(); } But instead of

zabbix上添加交换机监控记事

社会主义新天地 提交于 2019-12-03 01:57:35
​ zabbix上添加交换机监控记事 ​ 第一次使用zabbix来添加监控华为s5720交换机,根本找不到头绪,像个无头的苍蝇一样的百度来处理,结果都没有任何效果,给自己增加了很多痛苦和心烦,增加不少的白发。 经过询问前任,才发现添加交换机监控的门道,为此我这边记录一下: 第一:先打开zabbix监控画面,选择菜单:configuration--templates,点击create template,并输入名字及属于的groups组,说明,点击update,如下: 第二:添加application(应用集) 第三:添加items(监控项) 在这里添加监控项时就要注意了,这里的key和snmp oid要根据相应的交换机来查询得到其值才能监控到 以uptime为例来说明,key和snmp oid怎么来的,找百度,根本没有什么用处,why? 这么多数据,我要找那个,根本就行不通,我要一个个去测试吗?那就麻烦了,头大了。why? 有办法,看我的操作,还是以uptime为例: key和snmp oid对应的值为sysUpTimeInstance,这里要特别说明一下,我这边是华为s5700的交换机,上zabbix服务器来查询吧,let's go. 先说明一下snmpwalk命令的用法 snmpwalk命令格式``` snmpwalk -v 版本号 -c 密钥 设备ip oid 如

zabbix上添加交换机监控记事

扶醉桌前 提交于 2019-12-03 01:51:53
zabbix上添加交换机监控记事 ​ 第一次使用zabbix来添加监控华为s5720交换机,根本找不到头绪,像个无头的苍蝇一样的百度来处理,结果都没有任何效果,给自己增加了很多痛苦和心烦,增加不少的白发。 ​ 经过询问前任,才发现添加交换机监控的门道,为此我这边记录一下: 第一:先打开zabbix监控画面,选择菜单:configuration--templates,点击create template,并输入名字及属于的groups组,说明,点击update,如下: 第二:添加application(应用集) 第三:添加items(监控项) 在这里添加监控项时就要注意了,这里的key和snmp oid要根据相应的交换机来查询得到其值才能监控到 以uptime为例来说明,key和snmp oid怎么来的,找百度,根本没有什么用处,why? 这么多数据,我要找那个,根本就行不通,我要一个个去测试吗?那就麻烦了,头大了。why? 有办法,看我的操作,还是以uptime为例: key和snmp oid对应的值为sysUpTimeInstance,这里要特别说明一下,我这边是华为s5700的交换机,上zabbix服务器来查询吧,let's go. 先说明一下snmpwalk命令的用法 snmpwalk命令格式 snmpwalk -v 版本号 -c 密钥 设备ip oid 如:snmpwalk

zabbix上添加交换机监控记事

懵懂的女人 提交于 2019-12-03 01:49:20
zabbix上添加交换机监控记事 ​ 第一次使用zabbix来添加监控华为s5720交换机,根本找不到头绪,像个无头的苍蝇一样的百度来处理,结果都没有任何效果,给自己增加了很多痛苦和心烦,增加不少的白发。 ​ 经过询问前任,才发现添加交换机监控的门道,为此我这边记录一下: 第一:先打开zabbix监控画面,选择菜单:configuration--templates,点击create template,并输入名字及属于的groups组,说明,点击update,如下: 第二:添加application(应用集) 第三:添加items(监控项) 在这里添加监控项时就要注意了,这里的key和snmp oid要根据相应的交换机来查询得到其值才能监控到 以uptime为例来说明,key和snmp oid怎么来的,找百度,根本没有什么用处,why? 这么多数据,我要找那个,根本就行不通,我要一个个去测试吗?那就麻烦了,头大了。why? 有办法,看我的操作,还是以uptime为例: key和snmp oid对应的值为sysUpTimeInstance,这里要特别说明一下,我这边是华为s5700的交换机,上zabbix服务器来查询吧,let's go. 先说明一下snmpwalk命令的用法 snmpwalk命令格式 snmpwalk -v 版本号 -c 密钥 设备ip oid 如:snmpwalk