Operating System - Linux
1834394 Members
1639 Online
110066 Solutions
New Discussion

Configuring NetSnmp to send trap to NMS

 
Sirius Black
Regular Advisor

Configuring NetSnmp to send trap to NMS

Hi all,
I'm trying to send trap from my snmp agent automatically to monitor some things on my Linux server...
The problem is that I configure the snmpd.conf file then I start the agent:
/usr/sbin/snmpd -c /root/snmpd.conf.
On my NMS I see the start of the agent.
I put in my snmpd.conf a monitor for the size of a file...
But when I reach the size no one traps is sent to the NMS!!!

Any suggestion ?
Thanks Fabrizio

this is my snmpd.conf file:

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

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



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

# trap2sink: A SNMPv2c trap receiver
# arguments: host [community] [portnum]
trap2sink 10.203.71.175 word

# trapsess: A generic trap receiver defined using snmpcmd style arguments.
# Read the snmpcmd manual page for further information.
# arguments: [snmpcmdargs] host
informsink 10.203.71.175 word



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

# file: Check on the size of a file.
# Display a files size statistics.
# If it grows to be too large, report an error about it.
#
# file /path/to/file [maxsize_in_bytes]
#
# if maxsize is not specified, assume only size reporting is needed.
#
# The results are reported in the fileTable section of the UCD-SNMP-MIB tree

file /home/sirius/fabrizio 1000



###########################################################################
# SECTION: Agent Operating Mode
#
# This section defines how the agent will operate when it
# is running.

# master: Should the agent operate as a master agent or not.
# Currently, the only supported master agent type for this token
# is "agentx".
#
# arguments: (on|yes|agentx|all|off|no)
master agentx
master all



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

# 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 sirius
1 REPLY 1
njia_1
Trusted Contributor

Re: Configuring NetSnmp to send trap to NMS

Hi

I suggest you use ethereal to monitor snmp packet this is ususally what I do.

I think the problem is that the traps were not sent at all by some reason. Ethereal will be able to clearify this.

thanks