Advertisement
Guest User

Untitled

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