5 Replies Latest reply on Feb 20, 2009 5:35 AM by Yann

    Extracting OID returned data

      I'm using a combination of APC Environmental Management modules AP9319, AP9340, AP9341 to return temperature and humidity data.

      Both OIDs return 4 data elements, such as 0, 0, 0, 30.

      How do I extract  say the second number from this string so that I can create a custom poller that triggers when it exceeds a preset number ?

      Simon.

        • Re: Extracting OID returned data
          Yann

          If the values you are polling are from a table, you should be able to add an index number at the end of the OID to retrieve only one value.

          e.g. : OID.x.y.2 to retrieve the second value.

          Could you post the OIDs you are currently using?

          Thanks

          Yann

            • Re: Extracting OID returned data

              OIDs are:

              The temp OID is 1.3.6.1.4.1.318.1.1.10.3.13.1.1.3

              The humidy OID is 1.3.6.1.4.1.318.1.1.10.3.13.1.1.6

              I'm confused about the syntax to use. Are you saying to add ".2" at the end of the oid string above to get the 2nd data element ? That doesn't seem correct (although I haven't tried it yet). A comma (,2) would appear to be more likely.

              Thanks,

              Simon

                • Re: Extracting OID returned data
                  Yann

                  Hi,

                  Are you saying to add ".2" at the end of the oid string above to get the 2nd data element

                  Yes. so this means 1.3.6.1.4.1.318.1.1.10.3.13.1.1.3.2 for the temp and 1.3.6.1.4.1.318.1.1.10.3.13.1.1.6.2 for the humidity sensor.

                  It works for all the tables I tested it againsy, so I thought it would work as well on your table.

                  To ensure this works on your table, simply run a MIB walk (to see the full path + index number) or type the OID in a UnDP and select the following advanced options:

                  SNMP GET Type: GET

                  Polling Type: Node

                  Click on Next and test it on some nodes.

                  A comma (,2) would appear to be more likely.

                  I have never seen any comma in an OID path. OIDs path seems to be defined only with numbers and dots.


                  HTH,

                  Yann