Advertisement
Guest User

Untitled

a guest
Aug 10th, 2017
517
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.24 KB | None | 0 0
  1. bernardo@bernardo-ThinkCentre-Edge72:~$ sudo cat /etc/snmp/snmpd.conf
  2. [sudo] password for bernardo:
  3. ###############################################################################
  4. #
  5. # EXAMPLE.conf:
  6. # An example configuration file for configuring the Net-SNMP agent ('snmpd')
  7. # See the 'snmpd.conf(5)' man page for details
  8. #
  9. # Some entries are deliberately commented out, and will need to be explicitly activated
  10. #
  11. ###############################################################################
  12. #
  13. # AGENT BEHAVIOUR
  14. #
  15.  
  16. # Listen for connections from the local system only
  17. agentAddress udp:127.0.0.1:161
  18. # Listen for connections on all interfaces (both IPv4 *and* IPv6)
  19. #agentAddress udp:161,udp6:[::1]:161
  20.  
  21.  
  22.  
  23. ###############################################################################
  24. #
  25. # SNMPv3 AUTHENTICATION
  26. #
  27. # Note that these particular settings don't actually belong here.
  28. # They should be copied to the file /var/lib/snmp/snmpd.conf
  29. # and the passwords changed, before being uncommented in that file *only*.
  30. # Then restart the agent
  31.  
  32. # createUser authOnlyUser MD5 "remember to change this password"
  33. # createUser authPrivUser SHA "remember to change this one too" DES
  34. # createUser internalUser MD5 "this is only ever used internally, but still change the password"
  35.  
  36. # If you also change the usernames (which might be sensible),
  37. # then remember to update the other occurances in this example config file to match.
  38.  
  39.  
  40.  
  41. ###############################################################################
  42. #
  43. # ACCESS CONTROL
  44. #
  45.  
  46. # system + hrSystem groups only
  47. view systemonly included .1.3.6.1.2.1.1
  48. view systemonly included .1.3.6.1.2.1.25.1
  49.  
  50. # Full access from the local host
  51. #rocommunity public localhost
  52. # Default access to basic system info
  53. rocommunity public default -V systemonly
  54.  
  55. # Full access from an example network
  56. # Adjust this network address to match your local
  57. # settings, change the community string,
  58. # and check the 'agentAddress' setting above
  59. #rocommunity secret 10.0.0.0/16
  60.  
  61. # Full read-only access for SNMPv3
  62. rouser authOnlyUser
  63. # Full write access for encrypted requests
  64. # Remember to activate the 'createUser' lines above
  65. #rwuser authPrivUser priv
  66.  
  67. # It's no longer typically necessary to use the full 'com2sec/group/access' configuration
  68. # r[ow]user and r[ow]community, together with suitable views, should cover most requirements
  69.  
  70.  
  71.  
  72. ###############################################################################
  73. #
  74. # SYSTEM INFORMATION
  75. #
  76.  
  77. # Note that setting these values here, results in the corresponding MIB objects being 'read-only'
  78. # See snmpd.conf(5) for more details
  79. sysLocation Sitting on the Dock of the Bay
  80. sysContact Me <me@example.org>
  81. # Application + End-to-End layers
  82. sysServices 72
  83.  
  84.  
  85. #
  86. # Process Monitoring
  87. #
  88. # At least one 'mountd' process
  89. proc mountd
  90. # No more than 4 'ntalkd' processes - 0 is OK
  91. proc ntalkd 4
  92. # At least one 'sendmail' process, but no more than 10
  93. proc sendmail 10 1
  94.  
  95. # Walk the UCD-SNMP-MIB::prTable to see the resulting output
  96. # Note that this table will be empty if there are no "proc" entries in the snmpd.conf file
  97.  
  98.  
  99. #
  100. # Disk Monitoring
  101. #
  102. # 10MBs required on root disk, 5% free on /var, 10% free on all other disks
  103. disk / 10000
  104. disk /var 5%
  105. includeAllDisks 10%
  106.  
  107. # Walk the UCD-SNMP-MIB::dskTable to see the resulting output
  108. # Note that this table will be empty if there are no "disk" entries in the snmpd.conf file
  109.  
  110.  
  111. #
  112. # System Load
  113. #
  114. # Unacceptable 1-, 5-, and 15-minute load averages
  115. load 12 10 5
  116.  
  117. # Walk the UCD-SNMP-MIB::laTable to see the resulting output
  118. # Note that this table *will* be populated, even without a "load" entry in the snmpd.conf file
  119.  
  120.  
  121.  
  122. ###############################################################################
  123. #
  124. # ACTIVE MONITORING
  125. #
  126.  
  127. # send SNMPv1 traps
  128. trapsink localhost public
  129. # send SNMPv2c traps
  130. #trap2sink localhost public
  131. # send SNMPv2c INFORMs
  132. #informsink localhost public
  133.  
  134. # Note that you typically only want *one* of these three lines
  135. # Uncommenting two (or all three) will result in multiple copies of each notification.
  136.  
  137.  
  138. #
  139. # Event MIB - automatically generate alerts
  140. #
  141. # Remember to activate the 'createUser' lines above
  142. iquerySecName internalUser
  143. rouser internalUser
  144. # generate traps on UCD error conditions
  145. defaultMonitors yes
  146. # generate traps on linkUp/Down
  147. linkUpDownNotifications yes
  148.  
  149.  
  150.  
  151. ###############################################################################
  152. #
  153. # EXTENDING THE AGENT
  154. #
  155.  
  156. #
  157. # Arbitrary extension commands
  158. #
  159. extend test1 /bin/echo Hello, world!
  160. extend-sh test2 echo Hello, world! ; echo Hi there ; exit 35
  161. #extend-sh test3 /bin/sh /tmp/shtest
  162.  
  163. # Note that this last entry requires the script '/tmp/shtest' to be created first,
  164. # containing the same three shell commands, before the line is uncommented
  165.  
  166. # Walk the NET-SNMP-EXTEND-MIB tables (nsExtendConfigTable, nsExtendOutput1Table
  167. # and nsExtendOutput2Table) to see the resulting output
  168.  
  169. # Note that the "extend" directive supercedes the previous "exec" and "sh" directives
  170. # However, walking the UCD-SNMP-MIB::extTable should still returns the same output,
  171. # as well as the fuller results in the above tables.
  172.  
  173.  
  174. #
  175. # "Pass-through" MIB extension command
  176. #
  177. #pass .1.3.6.1.4.1.8072.2.255 /bin/sh PREFIX/local/passtest
  178. #pass .1.3.6.1.4.1.8072.2.255 /usr/bin/perl PREFIX/local/passtest.pl
  179.  
  180. # Note that this requires one of the two 'passtest' scripts to be installed first,
  181. # before the appropriate line is uncommented.
  182. # These scripts can be found in the 'local' directory of the source distribution,
  183. # and are not installed automatically.
  184.  
  185. # Walk the NET-SNMP-PASS-MIB::netSnmpPassExamples subtree to see the resulting output
  186.  
  187.  
  188. #
  189. # AgentX Sub-agents
  190. #
  191. # Run as an AgentX master agent
  192. master agentx
  193. # Listen for network connections (from localhost)
  194. # rather than the default named socket /var/agentx/master
  195. #agentXSocket tcp:localhost:705
  196.  
  197. com2sec readonly default public
  198. com2sec readwrite default private
  199. rocommunity public
  200. rwcommunity private
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement