0 Replies Latest reply: May 4, 2012 1:48 PM by 935158 RSS

    EM12c: Table retrieval using SNMP fetchlet places values in wrong rows

    935158
      Hi,

      This is a OEM EDK developed plugin related question:

      I am trying to retrieve data using SNMP fetchlet from two tables using single metric collection. These two table uses the same index but the second table only has a subset of the rows of the first table.

      The result of this combination makes the table descriptor (result table) of having the data from the second table on wrong rows and what is should be empty has values from the following tables/columns (or what the following get next operations returns).

      This is an pseudo example of the two tables.

      SNMP Table 1:

      index | Column A | Column B | Column C |
      1 | 1 | B1 | C1 |
      2 | 2 | B2 | C2 |
      3 | 3 | B3 | C3 |
      4 | 4 | B4 | C4 |

      SNMP Table 2:

      index | Column G | Column H | Column I | Column J |
      2 | G2 | H2 | I2 | J2 |
      4 | G4 | H4 | I4 | J4 |


      Table descriptor and Snmp fetchlet xml for the Plugin

           <Metric NAME="DataTable" TYPE="TABLE">
                <Display>
                     <Label NLSID="data_table">Data Table</Label>
                </Display>
                <TableDescriptor>
                     <ColumnDescriptor NAME="Index" TYPE="NUMBER" IS_KEY="TRUE">
                          <Display>
                               <Label NLSID="label_index">Index</Label>
                          </Display>
                     </ColumnDescriptor>
                     <ColumnDescriptor NAME="ColumnA" TYPE="NUMBER" IS_KEY="FALSE">
                          <Display>
                               <Label NLSID="label_column_a">Column A</Label>
                          </Display>
                     </ColumnDescriptor>
                     <ColumnDescriptor NAME="ColumnB" TYPE="STRING" IS_KEY="FALSE">
                          <Display>
                               <Label NLSID="label_column_b">Column B</Label>
                          </Display>
                     </ColumnDescriptor>
                     <ColumnDescriptor NAME="ColumnG" TYPE="STRING" IS_KEY="FALSE">
                          <Display>
                               <Label NLSID="label_column_g">Column G</Label>
                          </Display>
                     </ColumnDescriptor>
                     <ColumnDescriptor NAME="ColumnI" TYPE="STRING" IS_KEY="FALSE">
                          <Display>
                               <Label NLSID="label_column_i">Column I</Label>
                          </Display>
                     </ColumnDescriptor>
                </TableDescriptor>
                <QueryDescriptor FETCHLET_ID="Snmp">
                     <Property NAME="NAME" SCOPE="INSTANCE">NAME</Property>
                     <Property NAME="hostname" SCOPE="INSTANCE">hostName</Property>
                     <Property NAME="COMMUNITY" SCOPE="INSTANCE" OPTIONAL="TRUE">CommunityString</Property>
                     <Property NAME="TABLE" SCOPE="GLOBAL">TRUE</Property>
                     <Property NAME="TIMEOUT" SCOPE="INSTANCE" OPTIONAL="TRUE">Timeout</Property>
                     <Property NAME="OIDS" SCOPE="GLOBAL">
                          1.3.6.1.4.1.1234.3.10.1.2.2.1.1 <!-- Table 1 : Index oid -->
                          1.3.6.1.4.1.1234.3.10.1.2.2.1.2 <!-- Table 1 : ColumnA oid -->
                          1.3.6.1.4.1.1234.3.10.1.2.2.1.3 <!-- Table 1 : ColumnB oid -->
                          1.3.6.1.4.1.1234.3.10.1.2.9.1.1 <!-- Table 2 : ColumnG oid -->
                          1.3.6.1.4.1.1234.3.10.1.2.9.1.3 <!-- Table 2 : ColumnI oid -->
                     </Property>
                </QueryDescriptor>
           </Metric>


      The result of the metric collection is following:

      index | Column A | Column B | Column G | Column I |
      1 | 1 | B1 | G2 | I2 |
      2 | 2 | B2 | G4 | I4 |
      3 | 3 | B3 | H2 | J2 |
      4 | 4 | B4 | H4 | J4 |

      What I am expecting from this operations is following:

      index | Column A | Column B | Column G | Column I |
      1 | 1 | B1 | <empty> | <empty> |
      2 | 2 | B2 | G2 | I2 |
      3 | 3 | B3 | <empty> | <empty> |
      4 | 4 | B4 | G4 | I4 |


      Also this result is the same using either V1 or V2c SNMP requests.

      Anyone else run into this behavior or have suggestions on a workaround?

      I think the wrong row issue also exist even if you have just one table when there are rows being deleted while the getNext/getBulk operations are in progress to collect the metrics. This is just harder to reproduce since you have to have good/bad timing of the deletes where the getNext operation returns initial varbinds from the row being deleted and the rest of the varbinds in the list for the getNext/getBulk would be from the next row.

      Thank you for your interest of reading all the way to the of the message.

      Thanks, Ari