snmptrapd configuration...
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
hi,
System info: windows xp and netsnmp-5.5
i would like to configure snmptrapd to receive traps from localhost itself.
Kindly find the attachment files
snmp.conf
snmpd.conf
snmptrap.conf
icopied the files UCD-NOTIFICATION-TEST-MIB , TRAP-TEST-MIB into c:\usr\share\snmp\mibs
i copied trap config information from tutorials (snmptrapd).
the following two commands are showing nothing to me
c:\usr\bin\snmptrap -v 2c -c public host "" UCD-NOTIFICATION-TEST-MIB::demoNotif \
SNMPv2-MIB::sysLocation.0 s "Just here"
c:\usr\bin\snmptrap -v 1 -c public localhost TRAP-TEST-MIB::demotraps localhost 2 0 "" \
IF-MIB::ifIndex i 1
Kinldy tell me how to configure snmptrapd to receive traps?
and would you provide information on how to write traphandlers in c?
Thnks
ganesh y
http://www.bel-india.com Visit BEL Website
Confidentiality Notice
The information contained in this electronic message and any
attachments to this message are intended for the exclusive use of
the addressee(s) and may contain confidential or privileged
information. If you are not the intended recipient, please notify
the sender at Bharat Electronics or [email protected] immediately
and destroy all copies of this message and any attachments.
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
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
snmp.conf
(application/octet-stream, 1.2 KB)
########################################################################### # # snmp.conf # # - created by the snmpconf configuration program # ########################################################################### # SECTION: Default Authentication Options # # This section defines the default authentication # information. Setting these up properly in your # ~/.snmp/snmp.conf file will greatly reduce the amount of # command line arguments you need to type (especially for snmpv3). # defaultport: The default port number to use # This token specifies the default port number you want packets to # be sent to and received from. # override: with -p on the command line. # arguments: portnum defaultport 161 # defversion: The default snmp version number to use. # override: with -v on the command line. # arguments: 1|2c|3 defversion 2c # defcommunity: The default snmpv1 and snmpv2c community name to use when needed. # If this is specified, you don't need to include the community # name as an argument to the snmp applications. # override: with -c on the command line. # arguments: communityname defcommunity public
snmpd.conf
(application/octet-stream, 1.9 KB)
########################################################################### # # snmpd.conf # # - created by the snmpconf configuration program # ########################################################################### # SECTION: Access Control Setup # # This section defines who is allowed to talk to your running # snmp agent. # rocommunity: a SNMPv1/SNMPv2c read-only access community name # arguments: community [default|hostname|network/bits] [oid] rocommunity public localhost # rwcommunity: a SNMPv1/SNMPv2c read-write access community name # arguments: community [default|hostname|network/bits] [oid] rwcommunity private localhost ########################################################################### # SECTION: System Information Setup # # This section defines some of the information reported in # the "system" mib group in the mibII tree. # syslocation: The [typically physical] location of the system. # Note that setting this value here means that when trying to # perform an snmp SET operation to the sysLocation.0 variable will make # the agent return the "notWritable" error code. IE, including # this token in the snmpd.conf file will disable write access to # the variable. # arguments: location_string syslocation COMMUNICATIONS # syscontact: The contact information for the administrator # Note that setting this value here means that when trying to # perform an snmp SET operation to the sysContact.0 variable will make # the agent return the "notWritable" error code. IE, including # this token in the snmpd.conf file will disable write access to # the variable. # arguments: contact_string syscontact ADMINISTRATOR trapsink localhost public trapsink localhost private trap2sink localhost public trap2sink localhost private
snmptrapd.conf
(application/octet-stream, 380 B)
authCommunity log,execute,net public authCommunity log,execute,net private # the generic traps traphandle SNMPv2-MIB::coldStart c: /usr//bin/handle.pl cold traphandle SNMPv2-MIB::warmStart c: /usr//bin/handle.pl warm traphandle IF-MIB::linkDown c: /usr//bin/handle.pl down traphandle IF-MIB::linkUp c: /usr//bin/handle.pl up
handle.pl
(application/x-perl, 210 B)
read host
read ip
vars=
while read oid val
do
if [ "$vars" = "" ]
then
vars="$oid = $val"
else
vars="$vars, $oid = $val"
fi
done
echo trap: $1 $host $ip $vars