Blame EXAMPLE.conf.def

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