Bluehost.com Web Hosting $6.95

Re: Sending Snmptrap to manager specified in snmpd.conf

This is a discussion on Re: Sending Snmptrap to manager specified in snmpd.conf within the SNMP Coders forums, part of the Networking and Network Related category; On Wed, 2 Feb 2005 09:26:14 -0500 Alex wrote: AK> How do I know where snmpd.cof ...


Go Back   Usenet Forums > Networking and Network Related > SNMP Coders

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-16-2005
Robert Story
 
Posts: n/a
Default Re: Sending Snmptrap to manager specified in snmpd.conf

On Wed, 2 Feb 2005 09:26:14 -0500 Alex wrote:
AK> How do I know where snmpd.cof file is? A user may start Snmpd with a -c
AK> option for snmpd.conf.

Right. You can find out which files snmpd will read by default by running

snmpd -Dread_config -H 2>&1 | grep Reading | sort -u

AC> Does a NET-SNMP agent know where to send traps? Is
AK> it in a MIB?

By trapsinks set in the conf file, or added the to trap mib later. So, in
theory, you could use a snmp query of the agent to find trap destinations. It
is split over two table, so you'll also have to do a little correlation:

First get each 'tag' and 'type' from the notify table:

$ snmpwalk -v 2c localhost snmpNotifyTable
SNMP-NOTIFICATION-MIB::snmpNotifyTag.'internal0' = STRING: internal0
SNMP-NOTIFICATION-MIB::snmpNotifyType.'internal0' = INTEGER: trap(1)
SNMP-NOTIFICATION-MIB::snmpNotifyStorageType.'internal0' = INTEGER: readOnly(5)
SNMP-NOTIFICATION-MIB::snmpNotifyRowStatus.'internal0' = INTEGER:
active(1)

Then search for each 'tag' in the target table:

[3:49 rks 08:23 PM ~] aud $ snmpwalk -v 2c localhost
SNMP-TARGET-MIB::snmpTargetAddrTDomain.'internal0' = OID:
SNMPv2-TM::snmpUDPDomain SNMP-TARGET-MIB::snmpTargetAddrTAddress.'internal0' =
Hex-STRING: 7F 00 00 01 00 A2
SNMP-TARGET-MIB::snmpTargetAddrTimeout.'internal0' = INTEGER: 0
SNMP-TARGET-MIB::snmpTargetAddrRetryCount.'internal0' = INTEGER: 0
SNMP-TARGET-MIB::snmpTargetAddrTagList.'internal0' = STRING: internal0
SNMP-TARGET-MIB::snmpTargetAddrParams.'internal0' = STRING: internal0
SNMP-TARGET-MIB::snmpTargetAddrStorageType.'internal0' = INTEGER: readOnly(5)
SNMP-TARGET-MIB::snmpTargetAddrRowStatus.'internal0' = INTEGER: active(1)

The above example is for a simple 'trapsink 127.0.0.1'. You can experiment with
more complex settings for further testing...

--
Robert Story; NET-SNMP Junkie
Support: <http://www.net-snmp.org/> <irc://irc.freenode.net/#net-snmp>
Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-coders>

You are lost in a twisty maze of little standards, all different.


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 05:43 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0