Re: Query on Trap/Inform sent from a sub-agent based on agentx

anand anand <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <CAJtbuGJ9+LbAv4mU2M0sR24FW3Gvkrr1WWZxzjesV3wtiUSNPw@mail.gmail.com>
*Hello all ,

This is the snip from the snmpd log . It seems while calling the function
read_premib_configs a session is added with fd 7 for the trap2sink entry in
the snmpd.conf file*

read_config: /opt/benu/etc/snmp/snmpd.conf:106 examining: trap2sink
10.10.10.188:162  public
trace: run_config_handler(): read_config.c, 498:
read_config: Found a parser.  Calling it: trap2sink / 10.10.10.188:162
public
trace: netsnmp_tdomain_transport_full(): snmp_transport.c, 372:
tdomain: tdomain_transport_full("snmptrap", "10.10.10.188:162", 0, "[NIL]",
"[NIL]")
......
.......
netsnmp_udp: open remote UDP: [10.10.10.188]:162->[0.0.0.0]
daemonize: sysname 'Linux',
release '2.6.33.3-85.fc13.i686.PAE',
version '#1 SMP Thu May 6 18:27:11 UTC 2010',
machine 'i686'
trace: _sock_buffer_size_get(): snmpUDPDomain.c, 457:
socket:buffer: Requested client send buffer is 0
verbose:socket:buffer: Original client send buffer is 112640
verbose:socket:buffer: New client send buffer size is smaller than original!
socket:buffer: client send buffer not valid or not specified; using OS
default(112640)
trace: _sock_buffer_size_get(): snmpUDPDomain.c, 457:
socket:buffer: Requested client receive buffer is 0
verbose:socket:buffer: Original client receive buffer is 112640
verbose:socket:buffer: New client receive buffer size is smaller than
original!
socket:buffer: client receive buffer not valid or not specified; using OS
default(112640)
trace: netsnmp_udp_transport(): snmpUDPDomain.c, 698:
netsnmp_udp: client open UDP: [10.10.10.188]:162->[0.0.0.0]
trace: snmp_sess_add_ex(): snmp_api.c, 1663:
snmp_sess_add: fd 7

*Also while calling the function read_configs which is just after function
read_premib_configs  a session is added with fd 8*

read_config: /opt/benu/etc/snmp/snmpd.conf:106 examining: trap2sink
10.10.10.188:162  public
trace: run_config_handler(): read_config.c, 498:
read_config: Found a parser.  Calling it: trap2sink / 10.10.10.188:162
public
trace: netsnmp_tdomain_transport_full(): snmp_transport.c, 372:
tdomain: tdomain_transport_full("snmptrap", "10.10.10.188:162", 0, "[NIL]",
"[NIL]")
...
...
....
netsnmp_udp: open remote UDP: [10.10.10.188]:162->[0.0.0.0]
trace: _sock_buffer_size_get(): snmpUDPDomain.c, 457:
socket:buffer: Requested client send buffer is 0
verbose:socket:buffer: Original client send buffer is 112640
verbose:socket:buffer: New client send buffer size is smaller than original!
socket:buffer: client send buffer not valid or not specified; using OS
default(112640)
trace: _sock_buffer_size_get(): snmpUDPDomain.c, 457:
socket:buffer: Requested client receive buffer is 0
verbose:socket:buffer: Original client receive buffer is 112640
verbose:socket:buffer: New client receive buffer size is smaller than
original!
socket:buffer: client receive buffer not valid or not specified; using OS
default(112640)
trace: netsnmp_udp_transport(): snmpUDPDomain.c, 698:
netsnmp_udp: client open UDP: [10.10.10.188]:162->[0.0.0.0]
trace: snmp_sess_add_ex(): snmp_api.c, 1663:
snmp_sess_add: fd 8


*When Application sends the trap to snmpd it tries to forward it to
snmptrapd
I see two of these messages in the logs:*
netsnmp_udp: send 169 bytes from 0x8d7bc87 to UDP:
[10.10.10.188]:162->[0.0.0.0] on fd 7

netsnmp_udp: send 169 bytes from 0x8d7bc87 to UDP:
[10.10.10.188]:162->[0.0.0.0] on fd 8

Eventually on the snmptrapd logs i see the trap 2 times.
I have attached the snmpd logs for the same. If someone can help me
understand the behaviour. Also attached is the snmpd.conf file which is
being used.

Have i configured something in-correctly causing this behaviour ? We are
using net-snmp-5.5.1.

Regards
-anand

On Thu, Jul 21, 2011 at 6:32 PM, anand anand <[email protected]> wrote:

> Hello Dave,
>
> Before making the test, the NSN NMS  entry was removed from the snmpd.conf
> file. After this the snmpd and snmptrapd were restarted.
>
> Kindly let me know any keywords which i can look at in the snmpd log which
> can help root cause the issue or any other information which you may need
> from me.
>
> Thanks
> -anand
>
> On Thu, Jul 21, 2011 at 5:07 PM, Dave Shield <[email protected]>wrote:
>
>> On 21 July 2011 11:46, anand anand <[email protected]> wrote:
>> > In my snmpd.conf file i have only one entry for
>> > trap2sink  10.10.10.188:162 public
>>
>> Obvious question first - what is the address of the other trap2sink
>> entry that you mentioned ?  (nsn.nms.com)
>>
>> Dave
>>
>
>

------------------------------------------------------------------------------
Storage Efficiency Calculator
This modeling tool is based on patent-pending intellectual property that
has been used successfully in hundreds of IBM storage optimization engage-
ments, worldwide.  Store less, Store more with what you own, Move data to 
the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/

_______________________________________________
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
snmpdlog.tar.gz (application/x-gzip, 115.1 KB) - not displayed
snmpd.conf (application/octet-stream, 3.1 KB)
###########################################################################
#
# snmpd.conf
#
#   - created by the snmpconf configuration program
#



###########################################################################
# SECTION: Trap Destinations
#
#   Here we define who the agent will send traps to.

# trapcommunity: Default trap sink community to use
#   arguments: community-string

trapcommunity  public

# authtrapenable: Should we send traps when authentication failures occur
#   arguments: 1 | 2   (1 = yes, 2 = no)

# authtrapenable  2



###########################################################################
# SECTION: Monitor Various Aspects of the Running Host
#
#   The following check up on various aspects of a host.

# proc: Check for processes that should be running.
#     proc NAME [MAX=0] [MIN=0]
#   
#     NAME:  the name of the process to check for.  It must match
#            exactly (ie, http will not find httpd processes).
#     MAX:   the maximum number allowed to be running.  Defaults to 0.
#     MIN:   the minimum number to be running.  Defaults to 0.
#   
#   The results are reported in the prTable section of the UCD-SNMP-MIB tree
#   Special Case:  When the min and max numbers are both 0, it assumes
#   you want a max of infinity and a min of 1.

proc    



###########################################################################
# SECTION: Access Control Setup
#
#   This section defines who is allowed to talk to your running
#   snmp agent.

# rwuser: a SNMPv3 read-write user
#   arguments:  user [noauth|auth|priv] [restriction_oid]

rwuser  root  noauth

# rouser: a SNMPv3 read-only user
#   arguments:  user [noauth|auth|priv] [restriction_oid]

rouser  anand  
rwuser user2

# rwcommunity: a SNMPv1/SNMPv2c read-write access community name
#   arguments:  community [default|hostname|network/bits] [oid]

rwcommunity  public  
#rwcommunity private


###########################################################################
# 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  Hyderabad

# 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  [email protected]

# sysservices: The proper value for the sysServices object.
#   arguments:  sysservices_number

sysservices 76


master  agentx

trap2sink 10.10.10.188:162  public
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.