2017-01-19 22:56:26 -06:00
|
|
|
###############################################################################
|
2017-02-03 23:01:34 -06:00
|
|
|
# Managed by sonic-config-engine
|
2017-01-19 22:56:26 -06:00
|
|
|
###############################################################################
|
|
|
|
#
|
|
|
|
# EXAMPLE.conf:
|
|
|
|
# An example configuration file for configuring the Net-SNMP agent ('snmpd')
|
|
|
|
# See the 'snmpd.conf(5)' man page for details
|
|
|
|
#
|
|
|
|
# Some entries are deliberately commented out, and will need to be explicitly activated
|
|
|
|
#
|
|
|
|
###############################################################################
|
|
|
|
#
|
|
|
|
# AGENT BEHAVIOUR
|
|
|
|
#
|
|
|
|
|
2018-04-10 22:15:20 -05:00
|
|
|
# Listen for connections on all ip addresses, including eth0, ipv4 lo
|
2017-02-03 23:01:34 -06:00
|
|
|
agentAddress udp:161
|
2018-04-10 22:15:20 -05:00
|
|
|
# TODO: only support ipv4 lo addresses, add ipv6 support later
|
2017-02-03 23:01:34 -06:00
|
|
|
|
2017-01-19 22:56:26 -06:00
|
|
|
###############################################################################
|
|
|
|
#
|
|
|
|
# ACCESS CONTROL
|
|
|
|
#
|
|
|
|
|
|
|
|
# system + hrSystem groups only
|
|
|
|
view systemonly included .1.3.6.1.2.1.1
|
|
|
|
view systemonly included .1.3.6.1.2.1.25.1
|
|
|
|
|
|
|
|
# Default access to basic system info
|
2018-04-10 22:20:35 -05:00
|
|
|
{% if snmp_rocommunities %}
|
|
|
|
{% for community in snmp_rocommunities %}
|
|
|
|
rocommunity {{ community }}
|
|
|
|
{% endfor %}
|
|
|
|
{% else %}
|
2017-01-19 22:56:26 -06:00
|
|
|
rocommunity {{ snmp_rocommunity }}
|
2018-04-13 12:50:58 -05:00
|
|
|
{% endif %}
|
2017-01-19 22:56:26 -06:00
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
#
|
|
|
|
# SYSTEM INFORMATION
|
|
|
|
#
|
|
|
|
|
|
|
|
# Note that setting these values here, results in the corresponding MIB objects being 'read-only'
|
|
|
|
# See snmpd.conf(5) for more details
|
|
|
|
sysLocation {{ snmp_location }}
|
|
|
|
sysContact Azure Cloud Switch vteam <linuxnetdev@microsoft.com>
|
|
|
|
# Application + End-to-End layers
|
|
|
|
sysServices 72
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# Process Monitoring
|
|
|
|
#
|
2017-09-21 19:31:39 -05:00
|
|
|
# todo: should we enable snmp based monitoring of sswsyncd and other processes?
|
2017-01-19 22:56:26 -06:00
|
|
|
|
|
|
|
# At least one 'sendmail' process, but no more than 10
|
|
|
|
#proc sendmail 10 1
|
|
|
|
|
|
|
|
# Walk the UCD-SNMP-MIB::prTable to see the resulting output
|
|
|
|
# Note that this table will be empty if there are no "proc" entries in the snmpd.conf file
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# Disk Monitoring
|
|
|
|
#
|
|
|
|
# 10MBs required on root disk, 5% free on /var, 10% free on all other disks
|
|
|
|
disk / 10000
|
|
|
|
disk /var 5%
|
2017-09-21 19:31:39 -05:00
|
|
|
includeAllDisks 10%
|
2017-01-19 22:56:26 -06:00
|
|
|
|
|
|
|
# Walk the UCD-SNMP-MIB::dskTable to see the resulting output
|
|
|
|
# Note that this table will be empty if there are no "disk" entries in the snmpd.conf file
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# System Load
|
|
|
|
#
|
|
|
|
# Unacceptable 1-, 5-, and 15-minute load averages
|
|
|
|
load 12 10 5
|
|
|
|
|
|
|
|
# Walk the UCD-SNMP-MIB::laTable to see the resulting output
|
|
|
|
# Note that this table *will* be populated, even without a "load" entry in the snmpd.conf file
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
#
|
|
|
|
# ACTIVE MONITORING
|
|
|
|
#
|
|
|
|
# Note: disabled snmp traps due to side effect of causing snmpd to listen on all ports (0.0.0.0)
|
|
|
|
#
|
|
|
|
# send SNMPv1 traps
|
|
|
|
#trapsink localhost public
|
|
|
|
# send SNMPv2c traps
|
|
|
|
#trap2sink localhost public
|
|
|
|
# send SNMPv2c INFORMs
|
|
|
|
#informsink localhost public
|
|
|
|
|
|
|
|
# Note that you typically only want *one* of these three lines
|
|
|
|
# Uncommenting two (or all three) will result in multiple copies of each notification.
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# Event MIB - automatically generate alerts
|
|
|
|
#
|
|
|
|
# Remember to activate the 'createUser' lines above
|
2017-05-16 18:46:30 -05:00
|
|
|
#iquerySecName internalUser
|
2017-01-19 22:56:26 -06:00
|
|
|
#rouser internalUser
|
|
|
|
# generate traps on UCD error conditions
|
|
|
|
#defaultMonitors yes
|
|
|
|
#note, this release of snmpd does not support linkUpDownNotifications
|
|
|
|
# generate traps on linkUp/Down
|
|
|
|
#linkUpDownNotifications yes
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# AgentX Sub-agents
|
|
|
|
#
|
|
|
|
# Run as an AgentX master agent
|
|
|
|
master agentx
|
|
|
|
|
|
|
|
#
|
|
|
|
# SysDescription pass-through
|
|
|
|
#
|
|
|
|
|
|
|
|
pass -p 10 .1.3.6.1.2.1.1.1 /usr/share/snmp/sysDescr_pass.py
|