snmp

registering OIDs with snmp agent

末鹿安然 提交于 2019-12-07 09:56:44
问题 I am trying to simulate SNMP agent using snmp4j. I am trying to register MOs to the agent. Below is code snippet: static final OID mo1= new OID("1.3.6.1.4.1.1234.1.104"); static final OID mo2= new OID("1.3.6.1.4.1.1234.1.104.1"); static final OID mo3= new OID("1.3.6.1.4.1.1234.1.104.1.1"); agent.registerManagedObject(MOCreator.createReadOnly(mo1,"m1")); agent.registerManagedObject(MOCreator.createReadOnly(mo2,"m2")); agent.registerManagedObject(MOCreator.createReadOnly(mo3,"m3")); public

计算机网络 - 练习(一百五十七)

谁说我不能喝 提交于 2019-12-07 09:27:02
计算机网络 练习(一百五十七) 以下关于在 IPv6 中任意播地址的叙述中,错误的是 ( )。 A. 只能指定给 IPv6 路由器 B. 可以用作目标地址 C. 可以用作源地址 D. 代表一组接口的标识符 ---------------------------------------- 答案 : C 解析 : 任意播地址不能作为源地址使用。注意看题,错误 Kerberos 是对称密钥,而 PKI 是非对称密钥。 Windows Server 2003 中能够发送 SNMP 请求报文并能对 SNMP 报文进行解析的服务为 (1) ;用以监听被管主机发送来的陷入报文的服务为 (2) 。 问题1: A. SNMP Service B. Task Scheduler C. Terminal Services D. SNMP Trap Service 问题2: A. SNMP Service B. Task Scheduler C. Terminal Services D. SNMP Trap Service ---------------------------------------- 答案 : A D 解析 : Windows Server 2003 的 SNMP 服务包括两部分: SNMP Service 和 SNMP Trap Service 。其中, SNMP Service

SNMP GetBulk command

前提是你 提交于 2019-12-07 08:43:13
问题 i would like to know whether i can use the getbulk command with SNMPv1. If yes please let me know its adv... in no then what are the drawbacks. Thanks in advance. Uday. 回答1: No. That is determined by the protocol stack (GET BULK was introduced in v2 stack), not by other factors. If you want to use GET BULK, you have to use SNMP v2 and v3, not v1. 回答2: As others have stated, the GetBulkRequest was introduced in SNMPv2. However you may find it useful to know that a version 1 GetRequest PDU can

Generate SNMP traps with PHP

杀马特。学长 韩版系。学妹 提交于 2019-12-07 07:39:08
问题 I'm desperately searching for a way to generate SNMP traps from PHP. I know the build in methods to use snmpget but I was not able to figure out how to send SNMP traps. Does anybody know a class / code snippet for it? Searching the web did not bring up anything other than using exec to call cli tools which is definately no option for me. I suspect that it would be neccessary to use socket_create and corresponding functionality to generate the UDP package manually... 回答1: For anybody searching

How can I read an SNMP MIB file in c#?

浪尽此生 提交于 2019-12-07 06:33:19
问题 How to read a MIB file(.Mib file) using c#.net 回答1: You can write your own ASN.1 parser, or use an off-the-shelf component. I use NetToolWorks, and am happy with it. If you do want to roll your own, here's some sample code to get you started. 回答2: Based on what you need, you have multiple choices. ASN.1 parsers can be used to parse details. But if you just need to know the OID for objects, #SNMP Suite already has a basic MIB parser/compiler available via both its library (SharpSnmpLib.Mib

zabbix 3.4监控zookeeper3.4

送分小仙女□ 提交于 2019-12-06 18:37:47
zabbix3.4监控zookeeper zookeeper监控要点系统监控 这个监控linux系统以及修改linux服务器参数即可 内存使用量 ZooKeeper应当完全运行在内存中,不能使用到SWAP。Java Heap大小不能超过可用内存。 Swap使用量 使用Swap会降低ZooKeeper的性能,设置vm.swappiness = 0 网络带宽占用 如果发现ZooKeeper性能降低关注下网络带宽占用情况和丢包情况,通常情况下ZooKeeper是20%写入80%读入 磁盘使用量 ZooKeeper数据目录使用情况需要注意 磁盘I/O ZooKeeper的磁盘写入是异步的,所以不会存在很大的I/O请求,如果ZooKeeper和其他I/O密集型服务公用应该关注下磁盘I/O情况 ZooKeeper监控 zk_avg/min/max_latency 响应一个客户端请求的时间,建议这个时间大于10个Tick就报警 平均延迟/最小延迟/最大延迟 zk_outstanding_requests 排队请求的数量,当ZooKeeper超过了它的处理能力时,这个值会增大,建议设置报警阀值为10 堆积请求数 zk_packets_received 接收到客户端请求的包数量 收包数 zk_packets_sent 发送给客户单的包数量,主要是响应和通知 发包数 zk_max_file

how to decode the result of listenning to port 162 (Snmp Trap)?

独自空忆成欢 提交于 2019-12-06 16:08:28
I want to get the snmp trap by using my own traplistener. In fact, I used a code found in internet I added some modifications and now it is working. I can listen through the port 162. #include "stdio.h" #include "winsock2.h" #pragma comment(lib, "ws2_32.lib") #define SNMP_TRAP_PORT 162 #define MAX_MSG 400 static void init(void) { WSADATA wsa; int err = WSAStartup(MAKEWORD(2, 2), &wsa); if(err < 0) { puts("WSAStartup failed !"); exit(EXIT_FAILURE); } } static void end(void) { WSACleanup(); } int main(int argc, char *argv[]) { int sd, rc, n, cliLen; struct sockaddr_in cliAddr, servAddr; char msg

SNMP协议介绍

蓝咒 提交于 2019-12-06 14:11:12
本文地址: https://www.cnblogs.com/lsgxeva/p/9220949.html 一、什么是SNMP SNMP:“简单网络管理协议”,用于网络管理的协议。SNMP用于网络设备的管理。SNMP的工作方式:管理员需要向设备获取数据,所以SNMP提供了 “读”操作;管理员需要向设备执行设置操作,所以SNMP提供了“写”操作;设备需要在重要状况改变的时候,向管理员通报事件的发生,所以SNMP提供了 “Trap”操作。 二、SNMP背景 SNMP 的基本思想:为不同种类的设备、不同厂家生产的设备、不同型号的设备,定义为一个统一的接口和协议,使得管理员可以是使用统一的外观面对这些需要管理的网 络设备进行管理。通过网络,管理员可以管理位于不同物理空间的设备,从而大大提高网络管理的效率,简化网络管理员的工作。 三、SNMP结构概述 SNMP 被设计为工作在TCP/IP协议族上。SNMP基于TCP/IP协议工作,对网络中支持SNMP协议的设备进行管理。所有支持SNMP协议的设备都提供 SNMP这个统一界面,使得管理员可以使用统一的操作进行管理,而不必理会设备是什么类型、是哪个厂家生产的。如下图, 四、SNMP支持的网管操作 对于网络管理,我们面对的数据是设备的配置、参数、状态等信息,面对的操作是读取和设置;同时,因为网络设备众多,为了能及时得到设备的重要状态

Linux SNMP 监控一些常用OID

流过昼夜 提交于 2019-12-06 14:09:57
本文地址: https://www.cnblogs.com/lsgxeva/p/9220974.html 收集整理一些Linux下snmp常用的OID,用做服务器监控很不错。 服务器负载: 1 2 3 1 minute Load: .1.3.6.1.4.1.2021.10.1.3.1 5 minute Load: .1.3.6.1.4.1.2021.10.1.3.2 15 minute Load: .1.3.6.1.4.1.2021.10.1.3.3 CPU信息: 1 2 3 4 5 6 7 percentage of user CPU time: .1.3.6.1.4.1.2021.11.9.0 raw user cpu time: .1.3.6.1.4.1.2021.11.50.0 percentages of system CPU time: .1.3.6.1.4.1.2021.11.10.0 raw system cpu time: .1.3.6.1.4.1.2021.11.52.0 percentages of idle CPU time: .1.3.6.1.4.1.2021.11.11.0 raw idle cpu time: .1.3.6.1.4.1.2021.11.53.0 raw nice cpu time: .1.3.6.1.4.1.2021.11.51.0

Retrieve Hardware Informations through SNMP

对着背影说爱祢 提交于 2019-12-06 13:28:53
I am trying to retrieve hardware informations from a series of devices, so far I used snmpget/snmpwalk with the following OID 1.3.6.1.2.1.25.3.2.1 but it returns very few informations, for example if I run this on my computer from a Windows OS I get those CPUs: Unknown Processor Unknown Processor Unknown Processor Unknown Processor Instead if I run the command from Debian I get the correct value: Genuine Intel: Intel(R) Core(TM) i3 CPU M 330 @ 2.13GHz Guessing that there's a floating point co-processor I understand that Windows and Linux fill MIBs in a completely different way but, for istance