Hi Dave,

We  don“t have DisMan section in the snmpd.conf attached.

NET-SNMP version 5.1.2

BR,
Paulo


From: Dave Shield <[EMAIL PROTECTED]>
To: Paulo Ricardo <[EMAIL PROTECTED]>
CC: net-snmp-users@lists.sourceforge.net, [EMAIL PROTECTED]
Subject: Re: No traps for Link down/up in SUN Netra 240 machines
Date: Tue, 14 Feb 2006 11:49:13 +0000

On Tue, 2006-02-14 at 11:40 +0000, Paulo Ricardo wrote:
> Dave
>
> is it possible to ENABLE LinkDown/Up trap  in smpd.conf file ???

Yes.
You need an entry

        linkUpDownNotification yes

plus the related DisMan access control stuff.
I though we'd already said that?

Dave


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


snmp.conf   snmpd.conf
bash-2.05# more snmpd.conf
###########################################################################
#
# snmpd.conf
#
#   - created by the snmpconf configuration program
#
###########################################################################
# 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  "1st  Floor"

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

# ---- Setting Up the Port Number ----
# agentaddress [<transport-specifier>:]<transport-address> [,...]
#
# This makes the agent listen on the specified comma-separated list of listening addresses. At least one port must be # specified for the agent to function. The transport-specifier should always be set to udp. # The transport address is of the form: hostname[:<port>] or <IPv4-address>[:<port>]

# agentaddress 8161,localaddress:9161
# The above line makes the agent listen on UDP port 8161 on all IPv4 interfaces and UDP port 9161 only on the interface
# associated with the localhost address.

# agentaddress  161,tcp:161,localhost:9161
# This line will make the agent listen on UDP port 161 on all IPv4 interfaces, # TCP port 161 on all IPv4 interfaces and UDP port 9161 only on the interface associated with the localhost address.


###########################################################################
# SECTION: Access Control Setup
#
#
#   This section defines who is allowed to talk to your running
#   snmp agent.
#
# ----- rouser and rwuser -----
# rouser <user> [noauth|auth|priv] [<OID>]
# rwuser <user> [noauth|auth|priv] [<OID>]

# rouser: a SNMPv3 read-only user
# rwuser: a SNMPv3 read-write user

## The <OID> parameter restricts access for that user to everything below the given OID.

#agentSecName NAME
agentSecName admin

rouser  admin authNoPriv

rouser  ipworksuser noauth


#----- rocommunity and rwcommmunity -----
# These create read-only and read-write communities that can be used to access the agent. They are a simple wrapper # around the more complex and powerful com2sec, group, access, and view directive lines.They are also not as efficient # because groups are not created and the tables can be larger as a consequence. It is therefore better not to use these # if complex situations need to be set up, and to reserve their use to where the setup is simple.
#
# 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

#################################################################################
#
# ---- com2sec ----
# com2sec <name> <source> <community>
# This directive specifies the mapping from a source/community pair to a security name. <source> can be a hostname, # a subnet, or the word default. A subnet can be specified as IP/mask or IP/bits. The first source/community combination
# that matches the incoming packet is selected.

#     sec.name  source   community

# com2sec local  localhost  private
# com2sec public  default  public



# ---- group ----
# group <name> <model> <security>
#
# This directive defines the mapping from security model/securityname to group. <model> is one of SNMPv1, SNMPv2c, or usm.

#    sec.model sec.name
# group local  v1     local
# group local  v2c     local
# group local  usm     local

# group public v1     public
# group public v2c     public
# group public usm     public



# ---- view ----
# view <name> <type> <subtree> [<mask>]
#
# This defines the named view.
# <type> takes the value included or excluded.
# <mask> is a list of hex octets, separated by '.' or ':'.
#
# The mask defaults to ff if it is not specified. A bit value of 0 in the mask acts as a wildcard for the corresponding # value in the OID. A bit value of 1 in the mask indicates that the corresponding value in the sub tree OID is fixed # The mask helps to control access to one row in a table in a relatively simple way.

#   incl/excl subtree      mask
# view all  included .1      80


# ----- access ----
# access <name> <context> <model> <level> <prefix> READ WRITE NOTIFY
#
# The access directive maps from group/security model/security level to a view.
# <model> can take the values SNMPv1, SNMPv2c, or usm.
# <level> can take the values noauth, auth, or priv.
# <prefix> specifies how <context> should be matched against the context of the incoming pdu, and takes the values exact
# or prefix.
# For SNMPv1 or SNMPv2c access, <level> has the value noauth, and <context> has the value empty.

#-     context sec.model sec.level prefix read  write notify

# access public ""    any    noauth  exact all all all
# access local  ""    any    noauth  exact all all all

###########################################################################


# engineID <string>
# This line configures the engineID to the value of <string>.
# snmpd agent needs to be configured with an engineID so that it can respond to SNMPv3 messages. If engineID is not # configured, the agent uses a default value of the engineID based on the first IP address found for the hostname
# of the machine.


# ---- Sending Traps on errors  ----
# monitor [OPTIONS] NAME EXPRESSION
#
# This token tells the agent to monitor itself for problems based on EXPRESSION
# OPTIONS  can be
# -u SECNAME  - Use the SECNAME security name for scanning the local host
# -o OID - Specifies additional object values to be delivered with in the resulting trap in addition to the normal
# trap objects

monitor -u admin -o dskPath -o dskErrorMsg "dskTable" dskErrorFlag != 0


#includeAllDisks 15%


#SNMP agent will send alarms if free space on any of the below partitons falls below 15%

#disk  / 15%
#disk  /usr 15%
#disk  /var 15%
#disk  /opt 15%


###########################################################################
# SECTION: Sending Traps
#
# trapcommunity <string>
# trapcommunity directive defines the default community string to be used when sending traps

trapcommunity  public


# ---- Trap Destinations ----
# Here we define who the agent will send traps to.
#
# Use trapsink to specify a host to be sent SNMPv1 traps.
# trapsink <host>[<community>[<port>]]
#
# Use trap2sink to specify a host to be sent SNMPv2 traps.
# trap2sink <host>[<community>[<port>]]

trapsink  ossserver1 public 162


# trapsess -v 3 -e numoflocaleng -u user-a MD5 -A passwd-l authPriv -X passwd host:162 # trapsess is a more generic trap configuration token that allows any type of trap destination
# to be specified with any version of SNMP.
# where numoflocaleng is local engine ID , host is name of trap destination and user is SNMPv3 user name which is
# present in the specified host's (trap destination) user database.


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

authtrapenable  1


###########################################################################
# SECTION: Extending the Agent
#
#   You can extend the snmp agent to have it return information
#   that you yourself define.

# dlmod: dynamically extend the agent using a shared-object
#   arguments:  module-name module-path


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

#***NOTE***: If the agent is running, it does not update its running configuration unless explicitly requested to do so.
#To force it to update, type the following command on command line
# >kill -HUP


bash-2.05# vi snmpd.conf
"snmpd.conf" [Read only] 245 lines, 8686 characters
###########################################################################
#
# snmpd.conf
#
#   - created by the snmpconf configuration program
#
###########################################################################
# 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  "1st  Floor"

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

# ---- Setting Up the Port Number ----
# agentaddress [<transport-specifier>:]<transport-address> [,...]
#
# This makes the agent listen on the specified comma-separated list of listening addresses. At least one port must be # specified for the agent to function. The transport-specifier should always be set to udp. # The transport address is of the form: hostname[:<port>] or <IPv4-address>[:<port>]

# agentaddress 8161,localaddress:9161
# The above line makes the agent listen on UDP port 8161 on all IPv4 interfaces and UDP port 9161 only on the interface
# associated with the localhost address.

# agentaddress  161,tcp:161,localhost:9161
# This line will make the agent listen on UDP port 161 on all IPv4 interfaces, # TCP port 161 on all IPv4 interfaces and UDP port 9161 only on the interface associated with the localhost address.


###########################################################################
# SECTION: Access Control Setup
#
#
#   This section defines who is allowed to talk to your running
#   snmp agent.
#
# ----- rouser and rwuser -----
# rouser <user> [noauth|auth|priv] [<OID>]
# rwuser <user> [noauth|auth|priv] [<OID>]

# rouser: a SNMPv3 read-only user
# rwuser: a SNMPv3 read-write user

## The <OID> parameter restricts access for that user to everything below the given OID.

#agentSecName NAME
agentSecName admin

rouser  admin authNoPriv

rouser  ipworksuser noauth


#----- rocommunity and rwcommmunity -----
# These create read-only and read-write communities that can be used to access the agent. They are a simple wrapper # around the more complex and powerful com2sec, group, access, and view directive lines.They are also not as efficient # because groups are not created and the tables can be larger as a consequence. It is therefore better not to use these # if complex situations need to be set up, and to reserve their use to where the setup is simple.
#
# 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

#################################################################################
#
# ---- com2sec ----
# com2sec <name> <source> <community>
# This directive specifies the mapping from a source/community pair to a security name. <source> can be a hostname, # a subnet, or the word default. A subnet can be specified as IP/mask or IP/bits. The first source/community combination
# that matches the incoming packet is selected.

#     sec.name  source   community

# com2sec local  localhost  private
# com2sec public  default  public



# ---- group ----
# group <name> <model> <security>
#
# This directive defines the mapping from security model/securityname to group. <model> is one of SNMPv1, SNMPv2c, or usm.

#    sec.model sec.name
# group local  v1     local
# group local  v2c     local
# group local  usm     local

# group public v1     public
# group public v2c     public
# group public usm     public



# ---- view ----
# view <name> <type> <subtree> [<mask>]
#
# This defines the named view.
# <type> takes the value included or excluded.
# <mask> is a list of hex octets, separated by '.' or ':'.
#
# The mask defaults to ff if it is not specified. A bit value of 0 in the mask acts as a wildcard for the corresponding # value in the OID. A bit value of 1 in the mask indicates that the corresponding value in the sub tree OID is fixed # The mask helps to control access to one row in a table in a relatively simple way.

#   incl/excl subtree      mask
# view all  included .1      80


# ----- access ----
# access <name> <context> <model> <level> <prefix> READ WRITE NOTIFY
#
# The access directive maps from group/security model/security level to a view.
# <model> can take the values SNMPv1, SNMPv2c, or usm.
# <level> can take the values noauth, auth, or priv.
# <prefix> specifies how <context> should be matched against the context of the incoming pdu, and takes the values exact
# or prefix.
# For SNMPv1 or SNMPv2c access, <level> has the value noauth, and <context> has the value empty.

#-     context sec.model sec.level prefix read  write notify

# access public ""    any    noauth  exact all all all
# access local  ""    any    noauth  exact all all all

###########################################################################


# engineID <string>
# This line configures the engineID to the value of <string>.
# snmpd agent needs to be configured with an engineID so that it can respond to SNMPv3 messages. If engineID is not # configured, the agent uses a default value of the engineID based on the first IP address found for the hostname
# of the machine.


# ---- Sending Traps on errors  ----
# monitor [OPTIONS] NAME EXPRESSION
#
# This token tells the agent to monitor itself for problems based on EXPRESSION
# OPTIONS  can be
# -u SECNAME  - Use the SECNAME security name for scanning the local host
# -o OID - Specifies additional object values to be delivered with in the resulting trap in addition to the normal
# trap objects

monitor -u admin -o dskPath -o dskErrorMsg "dskTable" dskErrorFlag != 0


#includeAllDisks 15%


#SNMP agent will send alarms if free space on any of the below partitons falls below 15%

#disk  / 15%
#disk  /usr 15%
#disk  /var 15%
#disk  /opt 15%


###########################################################################
# SECTION: Sending Traps
#
# trapcommunity <string>
# trapcommunity directive defines the default community string to be used when sending traps

trapcommunity  public


# ---- Trap Destinations ----
# Here we define who the agent will send traps to.
#
# Use trapsink to specify a host to be sent SNMPv1 traps.
# trapsink <host>[<community>[<port>]]
#
# Use trap2sink to specify a host to be sent SNMPv2 traps.
# trap2sink <host>[<community>[<port>]]

trapsink  ossserver1 public 162


# trapsess -v 3 -e numoflocaleng -u user-a MD5 -A passwd-l authPriv -X passwd host:162 # trapsess is a more generic trap configuration token that allows any type of trap destination
# to be specified with any version of SNMP.
# where numoflocaleng is local engine ID , host is name of trap destination and user is SNMPv3 user name which is
# present in the specified host's (trap destination) user database.


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

authtrapenable  1


###########################################################################
# SECTION: Extending the Agent
#
#   You can extend the snmp agent to have it return information
#   that you yourself define.

# dlmod: dynamically extend the agent using a shared-object
#   arguments:  module-name module-path


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

#***NOTE***: If the agent is running, it does not update its running configuration unless explicitly requested to do so.
#To force it to update, type the following command on command line
# >kill -HUP


:q!
You have new mail in /var/mail/root
bash-2.05#
bash-2.05#
bash-2.05#
bash-2.05#

Reply via email to