linux454 has asked for the wisdom of the Perl Monks concerning the following question:

Fellow Monks, I'm attempting to implement an SNMP agent inside one of my applications so that It can provide info about it's state and health to another monitoring station. I'm using net-snmp and their perl bindings (NetSNMP,SNMP). I have scalar values working ok, however documentation for these modules are extremely lacking, as are examples. I'm trying to get tables to work currently and I've hit a road block. I was curious if anyone else has done something similar. Comments are greatly appreciated. (Yes, I know that there are probably easier ways, perhaps even better ways of accomplishing the same goal, but I'd like to stick with SNMP if at all possible) TIA.

Replies are listed 'Best First'.
Re: Writing a Perl net-snmp Agent
by AZPhantom (Initiate) on Apr 29, 2004 at 22:08 UTC
    I've used the SNMP modules on a large project where I used SNMP to talk with different types of network equipment. The largest problem I encountered was not with the module but with the inconsistancy of the SNMP MIBs or rather how those MIBs were populated with data. There really needs to be a standard that everyone follows. /rant but what sort of road block have you encountered specificly, I might be able to help if I know what problems you are having.
      Well, my problems are more related to fulfilling SNMP requests than asking requesting information from other hosts. I've just hit a void of documentation with regards of implementing a Table type of variable in my agent. For example I have something in my MIB that looks similar to:
      ... snmpExampleTable OBJECT-TYPE SYNTAX SEQUENCE OF TableEntry MAX-ACCESS not-accessible STATUS current ::= { parentOID 1 } tableEntry OBJECT-TYPE SYNTAX TableEntry MAX-ACCESS not-accessible STATUS current INDEX { tableEntryIndex } ::= { snmpExampleTable 1 } TableEntry ::= SEQUENCE { tableEntryIndex DisplayString, tableEntryName DisplayString, tableEntryVal DisplayString } tableEntryIndex OBJECT-TYPE SYNTAX DisplayString MAX-ACCESS read-only STATUS current ::= { tableEntry 1 } ...
      I'm not entirely sure what I need to pass to the NetSNMP::agent::netsnmp_request_infoPtr->setValue() method to get this table to work.
Re: Writing a Perl net-snmp Agent
by Anonymous Monk on Sep 04, 2014 at 13:59 UTC
    Did you get to know about it? I am also stuck there.

      You replied to a 10 year old post made by someone who hasn't been here in 3 years.

        Do you have any idea how to do that ?