How to generate a index from an snmp OID

Dear All,

I have a storage device that consists many individual blades. The main identifier for each blade is its serial number, this can be retrieved from an snmp table command. Each blade also has a specific type, which determines what metrics can be retrieved. Here a short example:

[root@server01 ~]# snmptable -v 1 -c public PANASAS-HW-MIB-V1::panHwNodeTable
SNMP table: PANASAS-HW-MIB-V1::panHwNodeTable

     panHwNodeHwSN panHwNodeType
 3c76000d300030001    "Director"
 3dc60008100051001     "Storage"
 3e760001100051001     "Storage"
 3e760002100051001     "Storage"
 3e760003100051001     "Storage"
 3e960001100051001     "Storage"
 3e960002100051001     "Storage"
 3e960002300030011    "Director"
 3e960003100051001     "Storage"
 3e960004100051001     "Storage"
 3e960005100051001     "Storage"
 3e960005300030011    "Director"
 3e960006100051001     "Storage"
 3e960009100051001     "Storage"

Now for example the director blades have some metrics I want to graph (CpuUtil, DiskUtil, ResponseTime, Ops). Unfortunately the corresponding table does not contain any index (like the serial number), it simply looks like this:

[root@server01 ~]# snmptable -v 1 -c public PANASAS-PERFORMANCE-MIB-V1::panPerfDirectorTable
SNMP table: PANASAS-PERFORMANCE-MIB-V1::panPerfDirectorTable

 panPerfDirectorCpuUtil panPerfDirectorDiskUtil panPerfDirectorResponseTime panPerfDirectorOps
                      3                       2                           0                  2
                      0                       1                           0                  2
                      1                       1                           1                 58

Now check the output from that table above when using the “snmpwalk” command instead of “snmptable”:

[root@server01 ~]# snmpwalk -v 1 -c public PANASAS-PERFORMANCE-MIB-V1::panPerfDirectorTable
PANASAS-PERFORMANCE-MIB-V1::panPerfDirectorCpuUtil."3c76000d300030001" = INTEGER: 2
PANASAS-PERFORMANCE-MIB-V1::panPerfDirectorCpuUtil."3e960002300030011" = INTEGER: 0
PANASAS-PERFORMANCE-MIB-V1::panPerfDirectorCpuUtil."3e960005300030011" = INTEGER: 1
PANASAS-PERFORMANCE-MIB-V1::panPerfDirectorDiskUtil."3c76000d300030001" = INTEGER: 1
PANASAS-PERFORMANCE-MIB-V1::panPerfDirectorDiskUtil."3e960002300030011" = INTEGER: 1
PANASAS-PERFORMANCE-MIB-V1::panPerfDirectorDiskUtil."3e960005300030011" = INTEGER: 1
PANASAS-PERFORMANCE-MIB-V1::panPerfDirectorResponseTime."3c76000d300030001" = Gauge32: 0
PANASAS-PERFORMANCE-MIB-V1::panPerfDirectorResponseTime."3e960002300030011" = Gauge32: 0
PANASAS-PERFORMANCE-MIB-V1::panPerfDirectorResponseTime."3e960005300030011" = Gauge32: 1
PANASAS-PERFORMANCE-MIB-V1::panPerfDirectorOps."3c76000d300030001" = Gauge32: 1
PANASAS-PERFORMANCE-MIB-V1::panPerfDirectorOps."3e960002300030011" = Gauge32: 1
PANASAS-PERFORMANCE-MIB-V1::panPerfDirectorOps."3e960005300030011" = Gauge32: 59

As you can see, the serial number is part of the OID for the metrics.

My question now is: Is there a way to create an input.conf file (using snmp) that will use the output of the column “panHwNodeHwSN” and link/join this as an index for the “panPerfDirectorTable” while matching that serial number part of the OID with the data from the “panHwNodeHwSN” column.

Thank you for your help!

Hi, do they use the same index?