Blame EXAMPLE.conf.def

Packit fcad23
###############################################################################
Packit fcad23
#
Packit fcad23
# EXAMPLE.conf:
Packit fcad23
#   An example configuration file for configuring the Net-SNMP agent ('snmpd')
Packit fcad23
#   See the 'snmpd.conf(5)' man page for details
Packit fcad23
#
Packit fcad23
#  Some entries are deliberately commented out, and will need to be explicitly activated
Packit fcad23
#
Packit fcad23
###############################################################################
Packit fcad23
#
Packit fcad23
#  AGENT BEHAVIOUR
Packit fcad23
#
Packit fcad23
Packit fcad23
#  Listen for connections from the local system only
Packit fcad23
agentAddress  udp:127.0.0.1:161
Packit fcad23
#  Listen for connections on all interfaces (both IPv4 *and* IPv6)
Packit fcad23
#agentAddress udp:161,udp6:[::1]:161
Packit fcad23
Packit fcad23
Packit fcad23
Packit fcad23
###############################################################################
Packit fcad23
#
Packit fcad23
#  SNMPv3 AUTHENTICATION
Packit fcad23
#
Packit fcad23
#  Note that these particular settings don't actually belong here.
Packit fcad23
#  They should be copied to the file /var/net-snmp/snmpd.conf
Packit fcad23
#     and the passwords changed, before being uncommented in that file *only*.
Packit fcad23
#  Then restart the agent
Packit fcad23
Packit fcad23
#  createUser authOnlyUser  MD5 "remember to change this password"
Packit fcad23
#  createUser authPrivUser  SHA "remember to change this one too"  DES
Packit fcad23
#  createUser internalUser  MD5 "this is only ever used internally, but still change the password"
Packit fcad23
Packit fcad23
#  If you also change the usernames (which might be sensible),
Packit fcad23
#  then remember to update the other occurances in this example config file to match.
Packit fcad23
Packit fcad23
Packit fcad23
Packit fcad23
###############################################################################
Packit fcad23
#
Packit fcad23
#  ACCESS CONTROL
Packit fcad23
#
Packit fcad23
Packit fcad23
                                                 #  system + hrSystem groups only
Packit fcad23
view   systemonly  included   .1.3.6.1.2.1.1
Packit fcad23
view   systemonly  included   .1.3.6.1.2.1.25.1
Packit fcad23
Packit fcad23
                                                 #  Full access from the local host
Packit fcad23
#rocommunity public  localhost
Packit fcad23
                                                 #  Default access to basic system info
Packit fcad23
 rocommunity public  default    -V systemonly
Packit fcad23
Packit fcad23
                                                 #  Full access from an example network
Packit fcad23
                                                 #     Adjust this network address to match your local
Packit fcad23
                                                 #     settings, change the community string,
Packit fcad23
                                                 #     and check the 'agentAddress' setting above
Packit fcad23
#rocommunity secret  10.0.0.0/16
Packit fcad23
Packit fcad23
                                                 #  Full read-only access for SNMPv3
Packit fcad23
 rouser   authOnlyUser
Packit fcad23
                                                 #  Full write access for encrypted requests
Packit fcad23
                                                 #     Remember to activate the 'createUser' lines above
Packit fcad23
#rwuser   authPrivUser   priv
Packit fcad23
Packit fcad23
#  It's no longer typically necessary to use the full 'com2sec/group/access' configuration
Packit fcad23
#  r[ou]user and r[ow]community, together with suitable views, should cover most requirements
Packit fcad23
Packit fcad23
Packit fcad23
Packit fcad23
###############################################################################
Packit fcad23
#
Packit fcad23
#  SYSTEM INFORMATION
Packit fcad23
#
Packit fcad23
Packit fcad23
#  Note that setting these values here, results in the corresponding MIB objects being 'read-only'
Packit fcad23
#  See snmpd.conf(5) for more details
Packit fcad23
sysLocation    Sitting on the Dock of the Bay
Packit fcad23
sysContact     Me <me@example.org>
Packit fcad23
                                                 # Application + End-to-End layers
Packit fcad23
sysServices    72
Packit fcad23
Packit fcad23
Packit fcad23
#
Packit fcad23
#  Process Monitoring
Packit fcad23
#
Packit fcad23
                               # At least one  'mountd' process
Packit fcad23
proc  mountd
Packit fcad23
                               # No more than 4 'ntalkd' processes - 0 is OK
Packit fcad23
proc  ntalkd    4
Packit fcad23
                               # At least one 'sendmail' process, but no more than 10
Packit fcad23
proc  sendmail 10 1
Packit fcad23
Packit fcad23
#  Walk the UCD-SNMP-MIB::prTable to see the resulting output
Packit fcad23
#  Note that this table will be empty if there are no "proc" entries in the snmpd.conf file
Packit fcad23
Packit fcad23
Packit fcad23
#
Packit fcad23
#  Disk Monitoring
Packit fcad23
#
Packit fcad23
                               # 10MBs required on root disk, 5% free on /var, 10% free on all other disks
Packit fcad23
disk       /     10000
Packit fcad23
disk       /var  5%
Packit fcad23
includeAllDisks  10%
Packit fcad23
Packit fcad23
#  Walk the UCD-SNMP-MIB::dskTable to see the resulting output
Packit fcad23
#  Note that this table will be empty if there are no "disk" entries in the snmpd.conf file
Packit fcad23
Packit fcad23
Packit fcad23
#
Packit fcad23
#  System Load
Packit fcad23
#
Packit fcad23
                               # Unacceptable 1-, 5-, and 15-minute load averages
Packit fcad23
load   12 10 5
Packit fcad23
Packit fcad23
#  Walk the UCD-SNMP-MIB::laTable to see the resulting output
Packit fcad23
#  Note that this table *will* be populated, even without a "load" entry in the snmpd.conf file
Packit fcad23
Packit fcad23
Packit fcad23
Packit fcad23
###############################################################################
Packit fcad23
#
Packit fcad23
#  ACTIVE MONITORING
Packit fcad23
#
Packit fcad23
Packit fcad23
                                    #   send SNMPv1  traps
Packit fcad23
 trapsink     localhost public
Packit fcad23
                                    #   send SNMPv2c traps
Packit fcad23
#trap2sink    localhost public
Packit fcad23
                                    #   send SNMPv2c INFORMs
Packit fcad23
#informsink   localhost public
Packit fcad23
Packit fcad23
#  Note that you typically only want *one* of these three lines
Packit fcad23
#  Uncommenting two (or all three) will result in multiple copies of each notification.
Packit fcad23
Packit fcad23
Packit fcad23
#
Packit fcad23
#  Event MIB - automatically generate alerts
Packit fcad23
#
Packit fcad23
                                   # Remember to activate the 'createUser' lines above
Packit fcad23
iquerySecName   internalUser       
Packit fcad23
rouser          internalUser
Packit fcad23
                                   # generate traps on UCD error conditions
Packit fcad23
defaultMonitors          yes
Packit fcad23
                                   # generate traps on linkUp/Down
Packit fcad23
linkUpDownNotifications  yes
Packit fcad23
Packit fcad23
Packit fcad23
Packit fcad23
###############################################################################
Packit fcad23
#
Packit fcad23
#  EXTENDING THE AGENT
Packit fcad23
#
Packit fcad23
Packit fcad23
#
Packit fcad23
#  Arbitrary extension commands
Packit fcad23
#
Packit fcad23
 extend    test1   /bin/echo  Hello, world!
Packit fcad23
 extend-sh test2   echo Hello, world! ; echo Hi there ; exit 35
Packit fcad23
#extend-sh test3   /bin/sh /tmp/shtest
Packit fcad23
Packit fcad23
#  Note that this last entry requires the script '/tmp/shtest' to be created first,
Packit fcad23
#    containing the same three shell commands, before the line is uncommented
Packit fcad23
Packit fcad23
#  Walk the NET-SNMP-EXTEND-MIB tables (nsExtendConfigTable, nsExtendOutput1Table
Packit fcad23
#     and nsExtendOutput2Table) to see the resulting output
Packit fcad23
Packit fcad23
#  Note that the "extend" directive supercedes the previous "exec" and "sh" directives
Packit fcad23
#  However, walking the UCD-SNMP-MIB::extTable should still returns the same output,
Packit fcad23
#     as well as the fuller results in the above tables.
Packit fcad23
Packit fcad23
Packit fcad23
#
Packit fcad23
#  "Pass-through" MIB extension command
Packit fcad23
#
Packit fcad23
#pass .1.3.6.1.4.1.8072.2.255  /bin/sh       PREFIX/local/passtest
Packit fcad23
#pass .1.3.6.1.4.1.8072.2.255  /usr/bin/perl PREFIX/local/passtest.pl
Packit fcad23
Packit fcad23
# Note that this requires one of the two 'passtest' scripts to be installed first,
Packit fcad23
#    before the appropriate line is uncommented.
Packit fcad23
# These scripts can be found in the 'local' directory of the source distribution,
Packit fcad23
#     and are not installed automatically.
Packit fcad23
Packit fcad23
#  Walk the NET-SNMP-PASS-MIB::netSnmpPassExamples subtree to see the resulting output
Packit fcad23
Packit fcad23
Packit fcad23
#
Packit fcad23
#  AgentX Sub-agents
Packit fcad23
#
Packit fcad23
                                           #  Run as an AgentX master agent
Packit fcad23
 master          agentx
Packit fcad23
                                           #  Listen for network connections (from localhost)
Packit fcad23
                                           #    rather than the default named socket /var/agentx/master
Packit fcad23
#agentXSocket    tcp:localhost:705