RE: How can I define my own trap?

Fernández Piñas, David <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
 
{ ncpstatus 2 } and  ::= { ncpcalleventsobjects 1 }are nodes on my MIB tree. You must use your own ones. 
 
http://www.iana.org/assignments/enterprise-numbers lists the numbers registered for private enterprises. For example, the Signal Theory and Communications department of UPC has registered node 2714. Maybe your department should apply for another at http://pen.iana.org/pen/PenApplication.page), or you can contact the responsible of the UPC MIB tree (node 25785) to get a node to define your MIB.
 
Another option is to define the MIB tree under experimental node for testing and then move to an official node.



________________________________

De: [email protected] [mailto:[email protected]] En nombre de Ignasi Paredes Oliva
Enviado el: lunes, 26 de enero de 2009 19:54
Para: Fernández Piñas, David
CC: [email protected]
Asunto: Re: How can I define my own trap?


Hi,

Thanks for your quick answer!

Now, I understand how to create the list with my own definitions but don't know what your last line of each object definition means (::= { ncpstatus 2 } and  ::= { ncpcalleventsobjects 1 } respectively)  Is this related to how should I retrieve the information from my database? I thought that it was enough to define the type of the variable (integer, string...)

Could you clarify me that point please?
Thanks!

Ignasi


2009/1/26 Fernández Piñas, David <[email protected]>


	
	I once defined a custom trap for monitoring calls on a VSAT this way:
	
	       ncpcallcleared NOTIFICATION-TYPE
	               OBJECTS { systemtrafficload, eventcode }
	               STATUS current
	               DESCRIPTION
	                       "Call cleared notification"
	               ::= { ncpcallevents 2 }
	
	where systemtrafficload and eventcode where defined in the same MIB file as:
	
	       systemtrafficload OBJECT-TYPE
	               SYNTAX Integer32 (0..100)
	               MAX-ACCESS read-only
	               STATUS current
	               DESCRIPTION
	                       "System load in %, i.e. currenttrafficchannels / max. capacity (system total traffic channels )."
	               ::= { ncpstatus 2 }
	
	       eventcode OBJECT-TYPE
	               SYNTAX INTEGER (0..900)
	               MAX-ACCESS accessible-for-notify
	               STATUS current
	               DESCRIPTION
	                       "Call end event code."
	               ::= { ncpcalleventsobjects 1 }
	
	The traps where generated by an extension to snmpd process.
	
	
	-----Mensaje original-----
	De: Ignasi Paredes Oliva [mailto:[email protected]]
	Enviado el: lunes, 26 de enero de 2009 18:46
	Para: [email protected]
	Asunto: How can I define my own trap?
	

	Hello,
	
	I'm trying to define my own trap but I don't know how should I do it.
	For now I have created the MIB file example of the web on my
	/usr/share/snmp/mibs:
	
	       TEST-MIB DEFINITIONS ::= BEGIN
	       IMPORTS ucdExperimental FROM UCD-SNMP-MIB;
	
	       demotraps OBJECT IDENTIFIER ::= { ucdExperimental 990 }
	
	       demoTrap TRAP-TYPE
	       ENTERPRISE demotraps
	       VARIABLES { sysLocation }
	       DESCRIPTION "An example of an SMIv1 trap"
	       ::= 17
	
	       END
	
	Using the following comand I can see the trap logged on my /var/log/daemon.log:
	snmptrap -v 1 -c public 127.0.0.1 UCD-TRAP-TEST-MIB::demotraps "" 6 17 "" SNMPv2-MIB::sysLocation.0 s "Just here"
	
	Now, my problem is that I want to define my own trap and I don't now how to do it. First, I want to retrieve some information of my mysql database and after that I would like to create a trap containing all that information (several numbers and strings) and, of course, send it. How should I do that? Should I create a new MIB file? In that case how can I define the desired list of variables?
	
	Thank you in advance.
	
	
	Best Regards,
	Ignasi
	
	
	------------------------------------------------------------------------------
	This SF.net email is sponsored by:
	SourcForge Community
	SourceForge wants to tell your story.
	http://p.sf.net/sfu/sf-spreadtheword
	_______________________________________________
	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
	



------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
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.