'Inter-Tables indexing' and perl

Turbo Fredriksson <[email protected]>
Newsgroups gmane.network.net-snmp.user
Organization Bah!
Message-ID <[email protected]>
I've been banging my head about this for about a week
now and just can't get it to work. I'd appreciate some
pointers on this.

I'm quite sure I've managed to get the MIB working, but
I can't get the output from the perl script to be tablified
correctly with 'snmptable'...

Output from 'snmpwalk' (OID_BASE is a shorthand for the
OID to the 'baculaStats' described below; '.1.3.6.1.4.1.8767.2.3'):
----- s n i p -----
# Number of clients:
OID_BASE.1.0 = 4
# Client index:
OID_BASE.4.1.1.1 = 1
OID_BASE.4.1.1.2 = 2
OID_BASE.4.1.1.3 = 3
OID_BASE.4.1.1.4 = 4
# Client names:
OID_BASE.4.1.2.1 = client1
OID_BASE.4.1.2.2 = client2
OID_BASE.4.1.2.3 = client3
OID_BASE.4.1.2.4 = client4
# Job names
OID_BASE.4.1.3.1.1 = Client1_System
OID_BASE.4.1.3.2.1 = Client2_System
OID_BASE.4.1.3.3.1 = Client3_System
OID_BASE.4.1.3.4.1 = Client4_System
OID_BASE.4.1.3.4.2 = Client4_Web
OID_BASE.4.1.3.4.3 = Client4_Web_Stats
OID_BASE.4.1.3.4.4 = Client4_Catalog
OID_BASE.4.1.3.4.5 = Client4_Devel
OID_BASE.4.1.3.4.6 = Client4_Homes
OID_BASE.4.1.3.4.7 = Client4_Mail
OID_BASE.4.1.3.4.8 = Client4_Old
OID_BASE.4.1.3.4.9 = Client4_RestoreFiles
----- s n i p -----

Output from 'snmptable':
----- s n i p -----
SNMP table: enterprises.bayourCom.snmp.baculaStats.baculaClientsTable

    baculaJobName baculaClientName    baculaJobName
     Client1_System              ?     Client1_System
     Client2_System              ?     Client2_System
    Client3_System               ?    Client3_System
    Client4_System               ?    Client4_System
       Client4_Web               ?       Client4_Web
 Client4_Web_Stats               ? Client4_Web_Stats
   Client4_Catalog               ?   Client4_Catalog
     Client4_Devel               ?     Client4_Devel
     Client4_Homes               ?     Client4_Homes
      Client4_Mail               ?      Client4_Mail
       Client4_Old               ?       Client4_Old
----- s n i p -----

That's not what I had expected of course. First, there's no
'client name' and secondly, the job name is specified TWICE...


The MIB for the 'baculaClientsTable' looks like this:
----- s n i p -----
-- .1.3.6.1.4.1.8767.2.3.4 baculaClientsTable
baculaClientsTable               OBJECT-TYPE
  SYNTAX                         SEQUENCE OF BaculaEntryClients
  MAX-ACCESS                     not-accessible
  STATUS                         current
  DESCRIPTION                    "A list of bacula statistic counters"
  ::= { baculaStats 4 }

  baculaClientsEntry             OBJECT-TYPE
    SYNTAX                       BaculaEntryClients
    MAX-ACCESS                   not-accessible
    STATUS                       current
    DESCRIPTION                  "An entry containing bacula statistics"
    INDEX                        { baculaIndexClients }
    ::= { baculaClientsTable 1 }

    BaculaEntryClients           ::= SEQUENCE {
      baculaIndexClients         CounterIndex,
      baculaClientName           DisplayString,
      baculaJobName              DisplayString
    }

    baculaIndexClients           OBJECT-TYPE
      SYNTAX                     CounterIndex
      MAX-ACCESS                 not-accessible
      STATUS                     current
      DESCRIPTION                "Reference Index for each counter."
      ::= { baculaClientsEntry 1 }

    baculaClientName             OBJECT-TYPE
      SYNTAX                     DisplayString (SIZE (0..255))
      MAX-ACCESS                 read-only
      STATUS                     current
      DESCRIPTION                "A textual string containing information about the
                                  statistics counters. This string should include the
                                  name of the counter."
      ::= { baculaClientsEntry 2 }

    baculaJobName                OBJECT-TYPE
      SYNTAX                     DisplayString (SIZE (0..255))
      MAX-ACCESS                 read-only
      STATUS                     current
      DESCRIPTION                "A textual string containing information about the job."
      ::= { baculaClientsEntry 3 }
----- s n i p -----


When I get THIS table working, I'll start trying to
get the next table - 'baculaStatsTable' (which is linked to
to this 'baculaClientsTable' table). But since the first
table don't work, I have no hope in getting something
reasonable from the second...
-- 
Iran SDI explosion [Hello to all my fans in domestic surveillance]
radar pits KGB Saddam Hussein FSF Soviet Ortega nuclear quiche bomb
colonel
[See http://www.aclu.org/echelonwatch/index.html for more about this]
[Or http://www.europarl.eu.int/tempcom/echelon/pdf/rapport_echelon_en.pdf]
If neither of these works, try http://www.aclu.org and search for echelon.


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.