Code: Select all
###############################################################################
# Access Control
###############################################################################
# sec.name source community
com2sec disman localhost public
com2sec mynetwork 192.168.1.1 public
com2sec mynetwork 192.168.2.0/24 public
com2sec mynetwork 20.10.0.0/16 public
####
# Second, map the security names into group names:
# sec.model sec.name
group MyRWGroup v1 disman
group MyRWGroup v2c disman
group MyRWGroup usm disman
group MyROGroup v1 mynetwork
group MyROGroup v2c mynetwork
group MyROGroup usm mynetwork
####
# Third, create a view for us to let the groups have rights to:
# incl/excl subtree mask
view all included .1 80
####
# Finally, grant the 2 groups access to the 1 view with different
# write permissions:
# context sec.model sec.level match read write notif
access MyROGroup "" any noauth exact all none none
access MyRWGroup "" any auth exact all all none
###############################################################################
# Process checks.
#
# 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.
#
# Examples:
#
# Make sure at least one sendmail, but less than or equal to 10 are running.
proc sendmail 10 1
proc sshd
proc cron
###############################################################################
# disk checks
#
# disk PATH [MIN=DEFDISKMINIMUMSPACE]
#
# PATH: mount path to the disk in question.
# MIN: Disks with space below this value will have the Mib's errorFlag set.
# Default value = DEFDISKMINIMUMSPACE.
# Check the / partition and make sure it contains at least 10 megs.
disk / 10000000
#disk /var 5%
#includeAllDisks 10%
###############################################################################
# load average checks
#
# load [1MAX=DEFMAXLOADAVE] [5MAX=DEFMAXLOADAVE] [15MAX=DEFMAXLOADAVE]
#
# 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 12 10 5
# -----------------------------------------------------------------------------
# Inteface up and down
# Trap server information
#trapsink 20.10.43.3 public
#trap2sink localhost public
informsink localhost public
trapcommunity public
authtrapenable 1
rouser authOnlyUser
iquerySecName authOnlyUser
defaultMonitors yes
linkUpDownNotifications no
monitor -u disman -t -r 30 -o dskPath -o dskAvail -o dskTotal "dskTable" dskErrorFlag 0 1
#monitor -u disman -t -r 30 -o dskPath -o dskErrorMsg "dskTable" dskErrorFlag != 0
#monitor machineTooBusy hrProcessorLoad > 90
###########################################################################
# SECTION: Agent Operating Mode
#
master agentx
#agentAddress udp:161
dontLogTCPWrappersConnects 1/etc/snmp/snmptrapd.conf
Code: Select all
authCommunity log, net, execute public
traphandle default /usr/sbin/snmptthandler
disableAuthorization yes/etc/snmp/snmp.conf
Code: Select all
# As the snmp packages come without MIB files due to license reasons, loading
# of MIBs is disabled by default. If you added the MIBs you can reenable
# loading them by commenting out the following line.
mibs IF-MIB:UCD-SNMP-MIB
# noTokenWarnings yes
#mibs +ALL