How can I define my own trap?

Ignasi Paredes Oliva <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
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
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.