Use Windows to Send an SNMP Trap

As a follow up to my post last week, I learned that you can use Windows to send an SNMP trap.  The functionality is built into windows, as long as you have enabled SNMP via computer management (in Windows 2008 R2 and later).  Once enabled in features, you can open the menu to configure SNMP by running the following command at the run menu:

evntwin

Once open, you can configure the trap that you require by utilizing the GUI that opens with evntwin.

evntwinHere you will add the event that you want sent to your SNMP server.  This is what is used as the trap definition.  You can then open the properties for the trap definition and get the Enterprise OID which can be used in your application such as SolarWinds to view the trap.

Once that is setup, you now need to tell the SNMP Service your community string and where you’re going to send the traps that we’ve created.  In the Services panel, you should have one for SNMP. Right-Click and choose Properties.  You’ll see the typical service tabs plus some that are specific to SNMP.

First, go to the agent tab and fill in the details about your organization.

SNMP Service AgentNext, you’ll want to go into the traps tab and fill in your community name and traps destination.

SNMP Service TrapsFinally, the security tab is where you’ll give rights to the community and trap sender.  localhost is in there by default and then you’ll want to include the same server that you’re sending traps to from the previous tab.

SNMP Service SecurityOnce all that is complete, you’re all set.  I typically would restart the service so it got the new settings. It’s a rather simple process to get going, but figuring it out was the tough part.

As always, hope it helped and feel free to leave a comment or question.