سؤال

I've been given a task to write some code to notify administrators if the device sends a trap. Also I'd like to be able to check upon the device as well.

I'm not so sure where to begin. Is there a test server online where I can test if I setup the device correctly? (Whether it send traps according to the condition I set?)

If I were to write code to monitor this device, I think I should learn how the snmp and mib files work exactly. Is there good summary and reference for me?

Is there some simple example code for snmp?

هل كانت مفيدة؟

المحلول

You can consider 2 basic ways to check whether the device of interest generating/sending out SNMP traps.

  1. You can just run wireshark on the device (if possible) or on the target server (where the traps supposed to arrive). Then you can filter the traffic using default SNMP ports. For example it could be one of the following: 161, 162, 10161, 10162.
  2. You can install a MIB browser on the target server and see if any traps arrive. There are number of available free applications on the web.

نصائح أخرى

download any trial based S/W to receive traps on your system like LoriotProV6 or SolarWids. In windows based sys open run evntwin.exe n select ur preferred options to generate traps like SNMP. Here you need to check for Trapping column if it says "Yes" then only select it.. or else it wont mean any thing. then click add run ur SNMP services.

To rum SNMP services go to control panel-> Add/Remove -> Add/Remove Windows component -> check Management & Monitoring click on details n check SNMP & WMI options. now go to control panel-> Administrator tools -> Services -> search SNMP services n& start it.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top