> > I have played different 'add_row' calls. No one succeeded. > > Can we stick with one, please - it's much less confusing when > trying to debug something remotely. Thanks. > > Comparing this: > > Using the following call > > # add_row gatewayTable 1 "TrendGateway" "reiner" > > "queue/macd/Gateway:TrendServer:trdv01" 1234 0 "Stopped" 0 0 0 0 0 > > 0 > > with the earlier example, the first thing I noticed is that you've > dropped a '1' before the "TrendGateway" value. > > So the first thing to get straight is how to handle the index column. > What is the MIB definition of this object? In particular, what is the > MAX-ACCESS clause? > > If it's defined as 'not-accessible' (which it ought to be), > then > add_row gatewayTable 1 "TrendGateway" ..... > > is correct, but I think you need to drop the first > COLUMN_GATEWAYINDEX, ASN_INTEGER, 1, 0, sizeof( int ), > > line from your netsnmp_table_set_multi_add_default_row()' call. > Otherwise, you probably *do* need > > add_row gatewayTable 1 1 "TrendGateway" .....
Well, I am using the line above in snmpd.conf to add a line. For COLUMN_GATEWAYINDEX the MIB has defined as: MAX-ACCESS not-accessible > [Wes - please chip in if I'm wrong here! You know this helper better > than I do, and I've never tried to use the "add_row" mechanism.] > > > 2004-10-13 15:26:54 table_set_add_row: adding index of type 2 > > 2004-10-13 15:26:54 table_set_add_row: adding data at column 1 of type > > 4 2004-10-13 15:26:54 table_set_add_row: adding data at column 2 of type > > 4 2004-10-13 15:26:54 table_set_add_row: adding data at column 3 of type > > 4 2004-10-13 15:26:54 table_set_add_row: adding data at column 4 of type > > 2 2004-10-13 15:26:54 table_set_add_row: adding data at column 5 of type > > 2 2004-10-13 15:26:54 table_set_add_row: adding data at column 6 of type > > 65 2004-10-13 15:26:54 /etc/snmp/snmpd.conf: line 146: > > Warning: missing an data > > value > > It's a bit difficult to interpret that in the absence of the MIB > definitions and/or the COLUMN_xxx #defines > > but it looks like three strings (programName, userName, gatewayAddress?) > followed by two integers (processID, processUptime?) > followed by 'type 65' which (I think) is an ASN.1 counter type. > > So where we'd expect to read in a string (processStatus?), > the config handler is looking for a counter (processUptime again?) > > Which would sort-of fit with the confusion over whether to include or > omit the index value. Comparing the module again with the MIB definition, I recognized strange error on my side: The COLUMN_GATEWAYINDEX has been moved from column 4 to 1 but the module has not been updated to follow this. After adjusting the code so that MIB and module match adding a line progresses. I found some more errors: The COLUMN_PROCESSUPTIME was defined in MIB as Timestamp and COLUMN_MESSAGESFROMXCONNECT to COLUMN_MESSAGESTOEXTERIEUR were defined in MIB as Counter. After changing the MIB for all this columns to INTEGER adding a row succeeds. This is somewhat unexpected on my side. Which column types are supported? > > Question: is it allowed to pass [0, sizeof(int) ] for ASN_INTEGER > > resp. [ NULL, 0 ] for ASN_OCTET_STR? > > Yes. That ought to be OK. > > What feels less acceptable is: > > COLUMN_PROCESSID, ASN_INTEGER, 1, NULL, 0, > > COLUMN_PROCESSUPTIME, ASN_COUNTER, 1, NULL, 0, > > I strongly suspect that both of these should be "0, sizeof(int)" > rather than "NULL, 0" Well, changing initialization of numeric COLUMN_PROCESSUPTIME from ASN_COUNTER, 1, NULL, 0, to ASN_INTEGER, 1, 0, sizeof( int ), make it better. > Try changing those two, and deleting the COLUMN_GATEWAYINDEX line. > (And stick with add_row gatewayTable 1 "TrendGateway" .....) > > How does that look? > > Dave Many thanks -Reiner ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.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