Results 1 to 7 of 7

Thread: Send SNMP message to a server

  1. #1

    Thread Starter
    Frenzied Member stateofidleness's Avatar
    Join Date
    Jan 2009
    Posts
    1,780

    Send SNMP message to a server

    Well today I got asked to have my application send an "SNMP" message to our company's server if certain conditions are met.

    I have no clue how to do this and a brief googling turned up a lot of C# results and a lot of the same unanswered question from others.

    I really don't know where to start. Is there an API I need to research? a free library? do I need sockets and all that?

    First time ever doing any snmp stuff so I'm a little lost.

    Any help is GREATLY appreciated!

  2. #2
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Re: Send SNMP message to a server

    Take a look at this

    http://sharpsnmplib.codeplex.com/
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

  3. #3

    Thread Starter
    Frenzied Member stateofidleness's Avatar
    Join Date
    Jan 2009
    Posts
    1,780

    Re: Send SNMP message to a server

    i tried that one, and it was the simplest of the ones i found. problem is, since it sends a udp packet, how can i know if it works or not? there's no response.

  4. #4
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Re: Send SNMP message to a server

    Sounds like SNMP to me. What kind of message did you send?
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

  5. #5

    Thread Starter
    Frenzied Member stateofidleness's Avatar
    Join Date
    Jan 2009
    Posts
    1,780

    Re: Send SNMP message to a server

    they fail to tell you that you need the SNMP service installed and running (which I have) and have it configured properly.

    I tested using their sample code off the site changing parameters where necessary. run the program and no errors, works just fine. however, the SNMP manager that I'm sending it to doesn't show it.

    the setup I have now is to write events to Event Viewer for my application and send traps based on those events. I believe this is working, but again no way to test for sure. It would be nice if I could send the trap myself straight from my application.

  6. #6
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Re: Send SNMP message to a server

    Does the management station have a MIB for the trap you are sending? Try sending one of the generic traps, at least you will know the management station is receiving the information.
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

  7. #7
    Lively Member
    Join Date
    Mar 2010
    Posts
    75

    Re: Send SNMP message to a server


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width