Sample snmpd.conf File

This topic lists a sample snmpd.conf file that you can use as a starting point for your configuration.
gateway91
This topic lists a sample
snmpd.conf
file that you can use as a starting point for your configuration.
###############################################################################
#
# CA API Gateway Example snmpd.conf:
#
###############################################################################
####
# map the community name "l7" from localhost and specific hosts into a "security name"
#       sec.name       source         community
com2sec localsec        localhost       l7
#com2sec subnetsec      192.168.1.0/24  l7
#com2sec hostsec        192.168.1.100   l7
####
# map the security names into a group name:
#       groupName      securityModel securityName
group   monitors        v1            localsec
group   monitors        v2c           localsec
group   monitors        usm           localsec
#group   monitors        v1            subnetsec
#group   monitors        v2c           subnetsec
#group   monitors        usm           subnetsec
#group   monitors        v1            hostsec
#group   monitors        v2c           hostsec
#group   monitors        usm           hostsec
####
# Define views to let the group have rights to:
#       name            incl/excl       subtree         mask(optional)
# Present entire "system.*" tree from SNMPv2-MIB (.1.3.6.1.2.1.1)
view    systemview      included        system
# Present host.hrSystem.hrSystemUptime from HOST-RESOURCES-MIB (.1.3.6.1.2.1.25.1.1)
view    systemview      included        host.hrSystem.hrSystemUptime
# Present extended MIB from UCD-SNMP-MIB (.1.3.6.1.4.1.2021)
view    systemview      included        enterprises.ucdavis
#view   systemview      excluded        enterprises.ucdavis.dskTable
#view   systemview      excluded        enterprises.ucdavis.fileTable
#view   systemview      excluded        enterprises.ucdavis.laTable
#view   systemview      excluded        enterprises.ucdavis.logMatch
#view   systemview      excluded        enterprises.ucdavis.memory
#view   systemview      excluded        enterprises.ucdavis.prTable
#view   systemview      excluded        enterprises.ucdavis.snmperrs
#view   systemview      excluded        enterprises.ucdavis.systemStats
view    systemview      excluded        enterprises.ucdavis.ucdExperimental
#view   systemview      excluded        enterprises.ucdavis.version
# Present L7 MIB
view    systemview              included        .1.3.6.1.4.1.17304
####
# grant the group read-only access to the systemview view.
#       group           context sec.model sec.level prefix read       write notif
access  monitors        ""      any       noauth    exact  systemview   none  none
###############################################################################
# System contact information
#
# It is also possible to set the sysContact and sysLocation system
# variables through the snmpd.conf file:
syscontact Joe Administrator <jadministrator@layer7tech.com>
syslocation Test system in lab
###############################################################################
# Process checks.
#
# Checks to see if processes called NAME are running on the agent
# machine. An error flag (1) and a description message are then
# passed to the 1.3.6.1.4.1.2021.2.1.100 and
# 1.3.6.1.4.1.2021.2.1.101 MIB columns (respectively) if the
# NAME’d program is not found in the process table as reported by
# "/bin/ps -e".
#
# If MAX and MIN are not specified, MAX is assumed to be infinity
# and MIN is assumed to be 1.
#
# If MAX is specified but MIN is not specified, MIN is assumed to
# be 0.
#
#  The following are examples of how to use the agent to check for
#  processes running on the host.  The syntax looks something like:
#
#  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.
#  Make sure java is running
proc java
# make sure mysqld is running
proc mysqld
# make sure sshd is running
proc sshd
# make sure bogus is running (error condition)
#proc bogus
# -----------------------------------------------------------------------------
###############################################################################
# disk checks
#
# Checks  the  named  disks  mounted  at  PATH for available disk
# space.  If the disk space is less than MINSPACE (kB) if  speci-
# fied  or  less than MINPERCENT (%) if a % sign is specified, or
# DEFDISKMINIMUMSPACE (kB) if not specified, the associated entry
# in  the  1.3.6.1.4.1.2021.9.1.100  MIB table will be set to (1)
# and a descriptive error message will be returned to queries  of
# 1.3.6.1.4.1.2021.9.1.101.
# The agent can check the amount of available disk space, and make
# sure it is above a set limit.
# disk PATH [MIN=100000]
#
# PATH:  mount path to the disk in question.
# MIN:   Disks with space below this value will have the Mib's errorFlag set.
#        Default value = 100000.
# Check the / partition and make sure it contains at least 10 gig
disk / 10485760
# -----------------------------------------------------------------------------
###############################################################################
# load average checks
#
# Checks the load average of the machine  and  returns  an  error
# flag  (1),  and  an  text-string  error  message  to queries of
# 1.3.6.1.4.1.2021.10.1.100     and     1.3.6.1.4.1.2021.10.1.101
# (respectively)  when the 1-minute, 5-minute, or 15-minute aver-
# ages exceed the associated maximum values.  If any of the MAX1,
# MAX5,  or MAX15 values are unspecified, they default to a value
# of DEFMAXLOADAVE.
# load [1MAX=12.0] [5MAX=12.0] [15MAX=12.0]
#
# 1MAX:   If the 1 minute load average is above this limit at query
#         time, the errorFlag will be set.
# 5MAX:   Similar, but for 5 min average.
# 15MAX:  Similar, but for 15 min average.
# Check for loads:
load 6 5 4
# -----------------------------------------------------------------------------
###############################################################################
# file size checks
#
# Monitors file sizes and makes sure they  don’t  grow  beyond  a
# certain  size  (in kilobytes).  MAXSIZE defaults to infinite if
# not specified, and only monitors  the  size  without  reporting
# errors about it.  A maximum of 20 files can be monitored.
# file FILE [MAXSIZE]
#
# FILE:    Full path to file
# MAXSIZE: Maximum file size (in kilobytes)
# Check files:
# ibdata starts at 1.0 GB. Set error if it exceeds 10.0 GB.
file /var/lib/mysql/ibdata 10485760
# Report on the default ssg log file
file /ssg/logs/default_-ssg_0_0.log
# Report on /var/log/messages
file /var/log/messages
# -----------------------------------------------------------------------------
###############################################################################
# Executable for service usage
#
pass .1.3.6.1.4.1.17304.7 /bin/sh /opt/SecureSpan/Appliance/bin/passServiceUsage.sh
# -----------------------------------------------------------------------------
# Added for support of bcm5820 cards. ?
pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat