SNMP

pduvellepduvelle
edited February 2013 in InfraSensing Sensors
I'm using IE to configure my sensor gateway, the MIB Browser to validate SNMP connectivity, and Wireshark to confirm packets.



I can WALK and see all the packets, then pick out the temperature from that set as OID .1.3.6.1.4.1.17095.3.2.0. So far so good. But when I try to GET that packet directly I get an error from MIB Browser: "Invalid operation on a node".



Can someone explain to me what I'm doing wrong? I need to add temperature logging to an in-house custom program, and therefore need to handle the SNMP UDP packets directly.



Thanks in advance!



P.S.: I am ordering the temp+humidity remote sensors, to connect to the gateway. What OID's will I need to work with on those?

Comments

  • AdministratorAdministrator
    Please double check the gateway and MIB browser's SNMP settings. Make sure they really match.
  • pduvellepduvelle
    Considering the "walk" feature works fine I'm not sure what SNMP settings could be off that prevent the "get" command from working properly. I would have attached some screen shots of the settings of the PC, the MIB browser, and of course the gateway. Unfortunately this interface requires a "web-available" picture (url) and won't allow me to upload pictures. However the settings all match the instructions in the "Quick Installation Guide

    For Environmental Sensors" from your web site.



    Thanks for your help on this,

    Phil
  • AdministratorAdministrator
    What MIB Browser are you using to do the GET request?
  • pduvellepduvelle
    I am using "ServersCheck MIB Browser" version 0.1, according to the >Help>About screen.
  • AdministratorAdministrator
    You need to use a different MIB Browser. We discontinued it 3 years ago.
  • pduvellepduvelle
    This is the one MIB browser I found on this web site. What MIB browser do you recommend and where/how can I get it?



    Also regarding my initial question, and given that I will be connecting a temp./humidity sensor to my gateway in the near future, what OID's will I need to use to "GET" those values?



    Do you have a document that describes the UDP packet contents in the "GET" exchange for these specific OID's? If you can tell me how to format my UDP "GET" packet to the gateway, I should be able to parse the response - though a description of that packet would be good too.



    Thank you
  • AdministratorAdministrator
    The OID will depend on which port you connect it.



    Here are some MIB Browsers:

    https://www.google.com/search?q=mib+browser



    We don't have a document describing how the SNMP GET protocol is structured. The SNMP is a standard protocol. I did a quick google but couldn't find any site describing the raw UDP packets for a SNMP GET call.
  • pduvellepduvelle
    Well, looks like iReasoning (http://ireasoning.com/download.shtml) is the popular tool so I'll go with that. Running out of time today but I'll hopefully capture a proper "GET" exchange tomorrow for OID .1.3.6.1.4.1.17095.3.2.0 (gateway's built-in temp. sensor).
  • adszafranadszafran
    I'm having a similar problem with the version 5 sensor gateways. I have a ton of version 4 gateways working just fine, but I'm also getting an Invalid Operation error when trying to poll the version 5 devices while the version 4 devices work just fine.



    I just received an order of 25 new version 5 devices and I have 2 of them on my desk for testing, neither one works. Not sure what I'm going to do here.



    The new devices seem very buggy. I can't get NTP to work on either of them. I enter the time zone -5 and after hitting update it successfully syncs with my NTP server but replaces the time zone value with "251" which screws it all up.



    Maybe there's already a firmware update for these new devices that addresses these issues. I'll have to check that out first.



    (update: I just read in another section of the forum that there is already a new firmware for the v5 devices that resolves the NTP issue. Hope it resolves the SNMP issue too)
  • AdministratorAdministrator
    Can you confirm that in your SNMP settings of the SensorGateway that:

    1) SNMP Agent is checked

    2) Port is 161

    3) The read & write community string have a value



    Here is a live demo one:



    Unit responds fine to SNMP WALKS & SNMP GET requests. Nagios is also plotting it fine in the Nagios demo server.



    IP: temphum.serverscheck.info

    Port: 161

    Community String: public



    Firmware: 3.02 on hardware version 5



    Web interface: http://temphum.serverscheck.info

    Login: admin / admin
  • adszafranadszafran
    verified everything. Same setup works 100% with the 35 other version 4 devices I have running. Doesn't work at all with the version 5 devices.



    I will try with your demo unit and get back to you shortly.


  • AdministratorAdministrator
    What software are you using to connect to the SensorGateway?
  • adszafranadszafran
    SolarWinds Orion NPM



    I tested with your demo unit. Same issue. No success.
  • AdministratorAdministrator
    Can you try with a MIB Browser? Like the Ireasoning one?



    Nagios, PRTG, Cacti, MRTG, our monitoring software, IReasoning MibBrowser are all reporting data
  • AdministratorAdministrator
    And did you try SNMP v3 for the SNMP Get requests or just v2?
  • adszafranadszafran
    OK.. I just tried Ireasoning MIB Browser. The following is what I found.



    - v5 devices to not respond to GET or WALK requests

    - v4 devices responded perfectly

    - tried a complete factory reset of v5 devices no luck

    - tried a brand new one I hadn't even opened yet with no luck

    - v4 and v5 devices are all on the same network, nothing getting in the way there.



    Could not try SNMPv3 with Ireasoning MIB browser because it's not available in the free edition, but I did try SNMPv3 earlier with SolarWinds and it did not work there either.



    I even tried taking my network out of the mix and connecting directly to my PC with a dumb switch on the default 192.168.11.0 network. Same Results.
  • AdministratorAdministrator
    So the iReasoning Mib Browser is not working with the demo sensor?



    We tried it from multiple locations in the world and it worked against the demo sensor.



    Could you upload images of

    - SNMP Settings

    - iReasoning Mib Browser setup



    You can upload them through following or similar

    http://tinypic.com/index.php
  • adszafranadszafran
    I haven't been back to the Ireasoning Browser but I figured it out in SolarWinds.



    Looks like the v4 devices respond just fine to GET NEXT requests, but the v5 devices will only respond to GET request if the OID was entered in manually instead of from the MIB tree..



    basically, by it looks at 1.3.6.1.4.1.17095.3.2 and tries a GET NEXT to obtain the value.



    the v5 devices fail with this type of request but the v4 devices work fine.



    so I had to change the request to a GET request and manually add .0 to the end of the OID.
  • AdministratorAdministrator
    So you use the MIB file to add a check in Solarwinds Orion?



    If so then that could narrow the issue down to the MIB file as there were some changes in the SNMP structure.
  • pduvellepduvelle
    Ok I feel like I owe the community some follow-up here, on the original questions.



    1) I was able to perform a GetRequest (GET) successfully using the iReasoning MIB browser



    2) I captured the full UDP exchange using wireshark



    3) After some digging online I finally found a good description of the GetRequest SNMP packet, and was able to better understand (and parse) the captured packets - thanks to codeidol:

    http://codeidol.com/csharp/csharp-network/SNMP/Working-with-SNMP-Packets/



    They also have an even better example GetRequest packet broken down by byte, as a picture:

    http://codeidol.com/img/csharp-network/f1202_0.jpg



    4) I am now logging my sensor gateway's built-in temperature sensor using GetRequest's



    One question remains. What OID's will I need to use for temperature & humidity values on both sensor ports, once I get those sensors? I'm expecting an additional 4 OID's here, on top of the one for the gateway's temperature.



    Thanks
  • AdministratorAdministrator
    You need to use SNMP walk to get the OID's you need for certain values. Here's a sample SNMP walk from ireasoning MIB browser with the OID's needed for the temperature and humidity sensors' readings:



    image
This discussion has been closed.