This is a discussion on SNMP Trap Query - Any thoughts? within the SNMP Users forums, part of the Networking and Network Related category; --0-1767663316-1129023666=:95200 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit I will like to ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
--0-1767663316-1129023666=:95200
Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit I will like to know regarding SNMP Trap OIDS issue I;m facing below - - On RedHat 3 , my subagent code is able to send custom trap OID ( defined in custom mib ). - On RedHat 4 / SUSE , with similar configuration , the subagent fails to send custom trap OID reporting "Var Bind Failure". On Changing the code to send "{ 1,3,6,1,6,3,1,1,4,1,0}; /* snmpTrapOID.0 */" with my custom trap information - it works ! Ofcourse the trap is sent as snmpTrapOID.0 as depcited in trap log file. I;m wondering if this is a configuration issue OR their is only provision to send snmpTrapOID.0 traps? On both RH4 and SUSE 9 - there are additional snmp files files - /usr/share/snmp/mib2c.notify.conf - with entry static oid snmptrap_oid[] = {1, 3, 6, 1, 6, 3, 1, 1, 4, 1, 0}; This file is NOT present in RH3. Though mib2c is only used for custom code generation - wondering? My code change is as below ---- /* trap definition objects */ memset(&var_trap, 0, sizeof(struct variable_list)); /#if 0 // workaround to fix the problem of not showing event OID var_trap.name = objid_snmptrap; /* snmpTrapOID.0 */ var_trap.name_length = sizeof(objid_snmptrap)/sizeof(oid); /* number of sub-ids */ //#endif // workaround to fix the problem of not showing event OID //var_trap.name = eventOID; //var_trap.name_length = OIDLEN_14; //var_trap.val.objid = eventOID; var_trap.val.objid = objid_snmptrap; var_trap.val_len = OIDLEN_14; var_trap.type = ASN_OBJECT_ID; var_trap.next_variable = &var_obj; /* next variable */ /#if 0 fprintf(stderr, "systemManagement Event-----------: \n"); printOID(var_trap.name, var_trap.name_length, "var_trap.name"); printOID(var_trap.val.objid, var_trap.val_len, "var_trap.val"); printOID(eventOID, OIDLEN_14, "eventOID"); /#endif /* additional objects */ Send instant messages to your online friends http://uk.messenger.yahoo.com --0-1767663316-1129023666=:95200 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit <DIV> <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid"> <P>I will like to know regarding SNMP Trap OIDS issue I;m facing below - </P> <P> </P> <P> - On RedHat 3 , my subagent code is able to send custom trap OID ( defined in custom mib ). </P> <P> - On RedHat 4 / SUSE , with similar configuration , the subagent fails to send custom trap OID reporting "Var Bind Failure".</P> <P> On Changing the code to send "{ 1,3,6,1,6,3,1,1,4,1,0}; /* snmpTrapOID.0 */" with my custom trap information - it works ! Ofcourse the trap is sent as snmpTrapOID.0 as depcited in trap log file. </P> <P> </P> <P> </P> <P>I;m wondering if this is a configuration issue OR their is only provision to send snmpTrapOID.0 traps? </P> <P> </P> <P>On both RH4 and SUSE 9 - there are additional snmp files files </P> <P> - /usr/share/snmp/mib2c.notify.conf - with entry static oid snmptrap_oid[] = {1, 3, 6, 1, 6, 3, 1, 1, 4, 1, 0}; </P> <P> </P> <P>This file is NOT present in RH3. Though mib2c is only used for custom code generation - wondering? </P> <P> </P> <P>My code change is as below ----</P> <P> </P> <P><BR> /* trap definition objects */<BR> memset(&var_trap, 0, sizeof(struct variable_list));</P> <P>/#if 0 // workaround to fix the problem of not showing event OID<BR> var_trap.name = objid_snmptrap; /* snmpTrapOID.0 */<BR> var_trap.name_length = sizeof(objid_snmptrap)/sizeof(oid); /* number of sub-ids */<BR>//#endif</P> <P> // workaround to fix the problem of not showing event OID<BR> //var_trap.name = eventOID;<BR> //var_trap.name_length = OIDLEN_14;<BR> //var_trap.val.objid = eventOID;<BR> var_trap.val.objid = objid_snmptrap;<BR> var_trap.val_len = OIDLEN_14;<BR> var_trap.type = ASN_OBJECT_ID;<BR> var_trap.next_variable = &var_obj; /* next variable */</P> <P>/#if 0<BR> fprintf(stderr, "systemManagement Event-----------: \n");<BR> printOID(var_trap.name, var_trap.name_length, "var_trap.name");<BR> printOID(var_trap.val.o bjid, var_trap.val_len, "var_trap.val");<BR> printOID(eventOID, OIDLEN_14, "eventOID");<BR>/#endif</P> <P> /* additional objects */</P> <P> </P> <P> </P> <P> </P> <P> </P></BLOCKQUOTE></DIV><BR><BR><p>Send instant messages to your online friends http://uk.messenger.yahoo.com --0-1767663316-1129023666=:95200-- ------------------------------------------------------- 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 Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/...net-snmp-users |