Retrieving SNMP trap destinations from Windows

Hello,

I am currently developing a C# program to detect/monitor USB activity.  If certain a certain device that I don’t want to be plugged in, gets plugged in, then the program will shoot off an SNMP trap to 4 servers that I specified in the code.  SNMP is enabled on the Windows 7 machine, but the program doesn’t use any of this as I have the UDP packet generation in the code.  I will be installing this on A LOT of machines, and realized that in the future it is going to be a pain if the 4 servers change.  I would have to update the code and reinstall the program on each machine.  

I have SNMP configured on the machines themselves with the same trap destination information that is in the code, but it is much easier to push out a change on that if the IP addresses of the servers were to change in the future.    Is there any way to pull in the “Trap Destinations” that I have set in Windows as a variable in my code?  If so, where is that information stored?  That way I could just push out a change to the SNMP configuration and the program would automatically work with the changes.

Sorry if this isn’t very clear…

Thanks
DickJansenAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rory de LeurConsultant End-User ComputingCommented:
Why not use fixed dns entries?

vb. usbchecker.resolved-domain.local

IF you want to scale your product, then options like round-robin or NLB comes to mind..
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
DickJansenAuthor Commented:
This is more of the information I was looking for, but I will accept yours as a possible solution

http://msdn.microsoft.com/en-us/library/aa915250.aspx

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\TrapConfiguration\public

KEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\TrapConfiguration\mycommunity

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\TrapVersion

0
DickJansenAuthor Commented:
I was really looking to get away from fixed FQDN entries in the code as those are likely to change at some point.  
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.