Advertisement
Guest User

Untitled

a guest
Jul 25th, 2018
1,029
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.37 KB | None | 0 0
  1. #
  2. #----------------------------------------------------------------------------
  3. # Avago Technologies
  4. # 1621 Barber Lane
  5. # Milpitas, California 95035
  6. #----------------------------------------------------------------------------
  7. # (c)Copyright 2004, Avago Technologies All Rights Reserved.
  8. # Information contained herein is confidential to and remains the property
  9. # of Avago Technologies
  10. #
  11. # # Avago's source code is an unpublished work and the use of copyright
  12. # notice does not imply otherwise. This source code contains confidential,
  13. # trade secret material of Avago Technologies. Any attempt or
  14. # participation in deciphering, decoding, reverse engineering or
  15. # in any way altering the source code is strictly prohibited, unless the
  16. # prior written consent of Avago Technologies.
  17. #
  18. #----------------------------------------------------------------------------
  19.  
  20. ###############################################################################
  21. #
  22. # snmpd.conf:
  23. # An example configuration file for configuring the ucd-snmp snmpd agent.
  24. #
  25. ###############################################################################
  26. #
  27. # This file is intended to only be as a starting point. Many more
  28. # configuration directives exist than are mentioned in this file. For
  29. # full details, see the snmpd.conf(5) manual page.
  30. #
  31. # All lines beginning with a '#' are comments and are intended for you
  32. # to read. All other lines are configuration commands for the agent.
  33.  
  34. ###############################################################################
  35. # Access Control
  36. ###############################################################################
  37.  
  38. # As shipped, the snmpd demon will only respond to queries on the
  39. # system mib group until this file is replaced or modified for
  40. # security purposes. Examples are shown below about how to increase the
  41. # level of access.
  42.  
  43. # By far, the most common question I get about the agent is "why won't
  44. # it work?", when really it should be "how do I configure the agent to
  45. # allow me to access it?"
  46. #
  47. # By default, the agent responds to the "public" community for read
  48. # only access, if run out of the box without any configuration file in
  49. # place. The following examples show you other ways of configuring
  50. # the agent so that you can change the community names, and give
  51. # yourself write access to the mib tree as well.
  52. #
  53. # For more information, read the FAQ as well as the snmpd.conf(5)
  54. # manual page.
  55.  
  56. ####/usr/src/redhat/RPMS/i386/1030snmp-2.7-1.i386.rpm
  57.  
  58. # add 'trapcommunity' command as shown below to send snmp traps to
  59. # custom community. Priority for community is trapsink>>trapcommunity
  60. # >>com2sec community. Multiple traps shall be sent if each hostname
  61. # has more than one port and or more than one community
  62.  
  63. # trapcommunity testComm
  64.  
  65. # First, map the community name "public" into a "security name"
  66.  
  67. # sec.name source community
  68. com2sec snmpclient 127.0.0.1 public
  69. com2sec snmpclient 172.28.136.112 public
  70. com2sec snmpclient 147.145.17.68 public
  71. com2sec snmpclient 147.145.18.161 public
  72. com2sec snmpclient 147.145.17.246 public
  73. com2sec snmpclient 147.145.18.215 public
  74. com2sec snmpclient 131.130.125.0/24 public
  75. # add your ip here to access snmpd from a client machine
  76.  
  77. # add 'trapsink' command in any of the following formats as shown below to
  78. # receive snmp traps at custom port if mentioned, else default SNMP
  79. # trap port 162 is used as shown below. If no community is present,
  80. # 'trapcommunity' as explained above shall be considered, else 'public'
  81. # community is used for sending traps
  82.  
  83. # trapsink 127.0.0.1 public 1234
  84. # trapsink 172.28.136.112 34215
  85. # trapsink 147.145.17.246
  86. # trapsink 154.34.675.322 trapcomm
  87.  
  88. ####
  89. # Second, map the security name into a group name:
  90.  
  91. # groupName securityModel securityName
  92. group RWGroup v1 snmpclient
  93. #group notConfigGroup v2c notConfigUser
  94.  
  95. ####
  96. # Third, create a view for us to let the group have rights to:
  97.  
  98. # name incl/excl subtree mask(optional)
  99. view all included .1 80
  100.  
  101. ####
  102. # Finally, grant the group read-only access to the systemview view.
  103.  
  104. # group context sec.model sec.level prefix read write notif
  105. access RWGroup "" any noauth exact all all all
  106. # the following dlmod is required for SATA SNMP
  107. #dlmod megaRaid /usr/lib/libmegaRaid.so
  108.  
  109. # -----------------------------------------------------------------------------
  110.  
  111. # Here is a commented out example configuration that allows less
  112. # restrictive access.
  113.  
  114. # YOU SHOULD CHANGE THE "COMMUNITY" TOKEN BELOW TO A NEW KEYWORD ONLY
  115. # KNOWN AT YOUR SITE. YOU *MUST* CHANGE THE NETWORK TOKEN BELOW TO
  116. # SOMETHING REFLECTING YOUR LOCAL NETWORK ADDRESS SPACE.
  117.  
  118. ## sec.name source community
  119. #com2sec local localhost COMMUNITY
  120. #com2sec mynetwork NETWORK/24 COMMUNITY
  121.  
  122. ## group.name sec.model sec.name
  123. #group MyRWGroup any local
  124. #group MyROGroup any mynetwork
  125. #
  126. #group MyRWGroup any otherv3user
  127. #...
  128.  
  129. ## incl/excl subtree mask
  130. #view all included .1 80
  131.  
  132. ## -or just the mib2 tree-
  133.  
  134. #view mib2 included .iso.org.dod.internet.mgmt.mib-2 fc
  135.  
  136.  
  137. ## context sec.model sec.level prefix read write notif
  138. #access MyROGroup "" any noauth 0 all none none
  139. #access MyRWGroup "" any noauth 0 all all all
  140.  
  141. ###############################################################################
  142. # System contact information
  143. #
  144.  
  145. # It is also possible to set the sysContact and sysLocation system
  146. # variables through the snmpd.conf file:
  147.  
  148. syslocation Unknown (edit /etc/snmp/snmpd.conf)
  149. syscontact Root <root@localhost> (configure /etc/snmp/snmp.local.conf)
  150.  
  151. # Example output of snmpwalk:
  152. # % snmpwalk -v 1 localhost -c public system
  153. # system.sysDescr.0 = "SunOS name sun4c"
  154. # system.sysObjectID.0 = OID: enterprises.ucdavis.ucdSnmpAgent.sunos4
  155. # system.sysUpTime.0 = Timeticks: (595637548) 68 days, 22:32:55
  156. # system.sysContact.0 = "Me <me@somewhere.org>"
  157. # system.sysName.0 = "name"
  158. # system.sysLocation.0 = "Right here, right now."
  159. # system.sysServices.0 = 72
  160.  
  161.  
  162. # -----------------------------------------------------------------------------
  163.  
  164.  
  165. ###############################################################################
  166. # Process checks.
  167. #
  168. # The following are examples of how to use the agent to check for
  169. # processes running on the host. The syntax looks something like:
  170. #
  171. # proc NAME [MAX=0] [MIN=0]
  172. #
  173. # NAME: the name of the process to check for. It must match
  174. # exactly (ie, http will not find httpd processes).
  175. # MAX: the maximum number allowed to be running. Defaults to 0.
  176. # MIN: the minimum number to be running. Defaults to 0.
  177.  
  178. #
  179. # Examples (commented out by default):
  180. #
  181.  
  182. # Make sure mountd is running
  183. #proc mountd
  184.  
  185. # Make sure there are no more than 4 ntalkds running, but 0 is ok too.
  186. #proc ntalkd 4
  187.  
  188. # Make sure at least one sendmail, but less than or equal to 10 are running.
  189. #proc sendmail 10 1
  190.  
  191. # A snmpwalk of the process mib tree would look something like this:
  192. #
  193. # % snmpwalk -v 1 localhost -c public .1.3.6.1.4.1.2021.2
  194. # enterprises.ucdavis.procTable.prEntry.prIndex.1 = 1
  195. # enterprises.ucdavis.procTable.prEntry.prIndex.2 = 2
  196. # enterprises.ucdavis.procTable.prEntry.prIndex.3 = 3
  197. # enterprises.ucdavis.procTable.prEntry.prNames.1 = "mountd"
  198. # enterprises.ucdavis.procTable.prEntry.prNames.2 = "ntalkd"
  199. # enterprises.ucdavis.procTable.prEntry.prNames.3 = "sendmail"
  200. # enterprises.ucdavis.procTable.prEntry.prMin.1 = 0
  201. # enterprises.ucdavis.procTable.prEntry.prMin.2 = 0
  202. # enterprises.ucdavis.procTable.prEntry.prMin.3 = 1
  203. # enterprises.ucdavis.procTable.prEntry.prMax.1 = 0
  204. # enterprises.ucdavis.procTable.prEntry.prMax.2 = 4
  205. # enterprises.ucdavis.procTable.prEntry.prMax.3 = 10
  206. # enterprises.ucdavis.procTable.prEntry.prCount.1 = 0
  207. # enterprises.ucdavis.procTable.prEntry.prCount.2 = 0
  208. # enterprises.ucdavis.procTable.prEntry.prCount.3 = 1
  209. # enterprises.ucdavis.procTable.prEntry.prErrorFlag.1 = 1
  210. # enterprises.ucdavis.procTable.prEntry.prErrorFlag.2 = 0
  211. # enterprises.ucdavis.procTable.prEntry.prErrorFlag.3 = 0
  212. # enterprises.ucdavis.procTable.prEntry.prErrMessage.1 = "No mountd process running."
  213. # enterprises.ucdavis.procTable.prEntry.prErrMessage.2 = ""
  214. # enterprises.ucdavis.procTable.prEntry.prErrMessage.3 = ""
  215. # enterprises.ucdavis.procTable.prEntry.prErrFix.1 = 0
  216. # enterprises.ucdavis.procTable.prEntry.prErrFix.2 = 0
  217. # enterprises.ucdavis.procTable.prEntry.prErrFix.3 = 0
  218. #
  219. # Note that the errorFlag for mountd is set to 1 because one is not
  220. # running (in this case an rpc.mountd is, but thats not good enough),
  221. # and the ErrMessage tells you what's wrong. The configuration
  222. # imposed in the snmpd.conf file is also shown.
  223. #
  224. # Special Case: When the min and max numbers are both 0, it assumes
  225. # you want a max of infinity and a min of 1.
  226. #
  227.  
  228.  
  229. # -----------------------------------------------------------------------------
  230.  
  231.  
  232. ###############################################################################
  233. # Executables/scripts
  234. #
  235.  
  236. #
  237. # You can also have programs run by the agent that return a single
  238. # line of output and an exit code. Here are two examples.
  239. #
  240. # exec NAME PROGRAM [ARGS ...]
  241. #
  242. # NAME: A generic name.
  243. # PROGRAM: The program to run. Include the path!
  244. # ARGS: optional arguments to be passed to the program
  245.  
  246. # a simple hello world
  247.  
  248. #exec echotest /bin/echo hello world
  249.  
  250. # Run a shell script containing:
  251. #
  252. # #!/bin/sh
  253. # echo hello world
  254. # echo hi there
  255. # exit 35
  256. #
  257. # Note: this has been specifically commented out to prevent
  258. # accidental security holes due to someone else on your system writing
  259. # a /tmp/shtest before you do. Uncomment to use it.
  260. #
  261. #exec shelltest /bin/sh /tmp/shtest
  262.  
  263. # Then,
  264. # % snmpwalk -v 1 localhost -c public .1.3.6.1.4.1.2021.8
  265. # enterprises.ucdavis.extTable.extEntry.extIndex.1 = 1
  266. # enterprises.ucdavis.extTable.extEntry.extIndex.2 = 2
  267. # enterprises.ucdavis.extTable.extEntry.extNames.1 = "echotest"
  268. # enterprises.ucdavis.extTable.extEntry.extNames.2 = "shelltest"
  269. # enterprises.ucdavis.extTable.extEntry.extCommand.1 = "/bin/echo hello world"
  270. # enterprises.ucdavis.extTable.extEntry.extCommand.2 = "/bin/sh /tmp/shtest"
  271. # enterprises.ucdavis.extTable.extEntry.extResult.1 = 0
  272. # enterprises.ucdavis.extTable.extEntry.extResult.2 = 35
  273. # enterprises.ucdavis.extTable.extEntry.extOutput.1 = "hello world."
  274. # enterprises.ucdavis.extTable.extEntry.extOutput.2 = "hello world."
  275. # enterprises.ucdavis.extTable.extEntry.extErrFix.1 = 0
  276. # enterprises.ucdavis.extTable.extEntry.extErrFix.2 = 0
  277.  
  278. # Note that the second line of the /tmp/shtest shell script is cut
  279. # off. Also note that the exit status of 35 was returned.
  280.  
  281. # -----------------------------------------------------------------------------
  282.  
  283.  
  284. ###############################################################################
  285. # disk checks
  286. #
  287.  
  288. # The agent can check the amount of available disk space, and make
  289. # sure it is above a set limit.
  290.  
  291. # disk PATH [MIN=100000]
  292. #
  293. # PATH: mount path to the disk in question.
  294. # MIN: Disks with space below this value will have the Mib's errorFlag set.
  295. # Default value = 100000.
  296.  
  297. # Check the / partition and make sure it contains at least 10 megs.
  298.  
  299. #disk / 10000
  300.  
  301. # % snmpwalk -v 1 localhost -c public .1.3.6.1.4.1.2021.9
  302. # enterprises.ucdavis.diskTable.dskEntry.diskIndex.1 = 0
  303. # enterprises.ucdavis.diskTable.dskEntry.diskPath.1 = "/" Hex: 2F
  304. # enterprises.ucdavis.diskTable.dskEntry.diskDevice.1 = "/dev/dsk/c201d6s0"
  305. # enterprises.ucdavis.diskTable.dskEntry.diskMinimum.1 = 10000
  306. # enterprises.ucdavis.diskTable.dskEntry.diskTotal.1 = 837130
  307. # enterprises.ucdavis.diskTable.dskEntry.diskAvail.1 = 316325
  308. # enterprises.ucdavis.diskTable.dskEntry.diskUsed.1 = 437092
  309. # enterprises.ucdavis.diskTable.dskEntry.diskPercent.1 = 58
  310. # enterprises.ucdavis.diskTable.dskEntry.diskErrorFlag.1 = 0
  311. # enterprises.ucdavis.diskTable.dskEntry.diskErrorMsg.1 = ""
  312.  
  313. # -----------------------------------------------------------------------------
  314.  
  315.  
  316. ###############################################################################
  317. # load average checks
  318. #
  319.  
  320. # load [1MAX=12.0] [5MAX=12.0] [15MAX=12.0]
  321. #
  322. # 1MAX: If the 1 minute load average is above this limit at query
  323. # time, the errorFlag will be set.
  324. # 5MAX: Similar, but for 5 min average.
  325. # 15MAX: Similar, but for 15 min average./usr/src/redhat/RPMS/i386/1030snmp-2.7-1.i386.rpm
  326.  
  327. # Check for loads:
  328. #load 12 14 14
  329.  
  330. # % snmpwalk -v 1 localhost -c public .1.3.6.1.4.1.2021.10
  331. # enterprises.ucdavis.loadTable.laEntry.loadaveIndex.1 = 1
  332. # enterprises.ucdavis.loadTable.laEntry.loadaveIndex.2 = 2
  333. # enterprises.ucdavis.loadTable.laEntry.loadaveIndex.3 = 3
  334. # enterprises.ucdavis.loadTable.laEntry.loadaveNames.1 = "Load-1"
  335. # enterprises.ucdavis.loadTable.laEntry.loadaveNames.2 = "Load-5"
  336. # enterprises.ucdavis.loadTable.laEntry.loadaveNames.3 = "Load-15"
  337. # enterprises.ucdavis.loadTable.laEntry.loadaveLoad.1 = "0.49" Hex: 30 2E 34 39
  338. # enterprises.ucdavis.loadTable.laEntry.loadaveLoad.2 = "0.31" Hex: 30 2E 33 31
  339. # enterprises.ucdavis.loadTable.laEntry.loadaveLoad.3 = "0.26" Hex: 30 2E 32 36
  340. # enterprises.ucdavis.loadTable.laEntry.loadaveConfig.1 = "12.00"
  341. # enterprises.ucdavis.loadTable.laEntry.loadaveConfig.2 = "14.00"
  342. # enterprises.ucdavis.loadTable.laEntry.loadaveConfig.3 = "14.00"
  343. # enterprises.ucdavis.loadTable.laEntry.loadaveErrorFlag.1 = 0
  344. # enterprises.ucdavis.loadTable.laEntry.loadaveErrorFlag.2 = 0
  345. # enterprises.ucdavis.loadTable.laEntry.loadaveErrorFlag.3 = 0
  346. # enterprises.ucdavis.loadTable.laEntry.loadaveErrMessage.1 = ""
  347. # enterprises.ucdavis.loadTable.laEntry.loadaveErrMessage.2 = ""
  348. # enterprises.ucdavis.loadTable.laEntry.loadaveErrMessage.3 = ""
  349.  
  350. # -----------------------------------------------------------------------------
  351.  
  352.  
  353. ###############################################################################
  354. # Extensible sections.
  355. #
  356.  
  357. # This alleviates the multiple line output problem found in the
  358. # previous executable mib by placing each mib in its own mib table:
  359.  
  360. # Run a shell script containing:
  361. #
  362. # #!/bin/sh
  363. # echo hello world
  364. # echo hi there
  365. # exit 35
  366. #
  367. # Note: this has been specifically commented out to prevent
  368. # accidental security holes due to someone else on your system writing
  369. # a /tmp/shtest before you do. Uncomment to use it.
  370. #
  371. # exec .1.3.6.1.4.1.2021.50 shelltest /bin/sh /tmp/shtest
  372.  
  373. # % snmpwalk -v 1 localhost -c public .1.3.6.1.4.1.2021.50
  374. # enterprises.ucdavis.50.1.1 = 1
  375. # enterprises.ucdavis.50.2.1 = "shelltest"
  376. # enterprises.ucdavis.50.3.1 = "/bin/sh /tmp/shtest"
  377. # enterprises.ucdavis.50.100.1 = 35
  378. # enterprises.ucdavis.50.101.1 = "hello world."
  379. # enterprises.ucdavis.50.101.2 = "hi there."
  380. # enterprises.ucdavis.50.102.1 = 0
  381.  
  382. # Now the Output has grown to two lines, and we can see the 'hi
  383. # there.' output as the second line from our shell script.
  384. #
  385. # Note that you must alter the mib.txt file to be correct if you want
  386. # the .50.* outputs above to change to reasonable text descriptions.
  387.  
  388. # Other ideas:
  389. #
  390. # exec .1.3.6.1.4.1.2021.51 ps /bin/ps
  391. # exec .1.3.6.1.4.1.2021.52 top /usr/local/bin/top
  392. # exec .1.3.6.1.4.1.2021.53 mailq /usr/bin/mailq
  393.  
  394. # -----------------------------------------------------------------------------
  395.  
  396.  
  397. ###############################################################################
  398. # Pass through control.
  399. #
  400.  
  401. # Usage:
  402. # pass MIBOID EXEC-COMMAND
  403. #
  404. # This will pass total control of the mib underneath the MIBOID
  405. # portion of the mib to the EXEC-COMMAND.
  406. #
  407. # Note: You'll have to change the path of the passtest script to your
  408. # source directory or install it in the given location.
  409. #
  410. # Example: (see the script for details)
  411. # (commented out here since it pass .1.3.6.1.4.1.3582 /usr/sbin/gen1030mainrequires that you place the
  412. # script in the right location. (its not installed by default))
  413.  
  414. # pass .1.3.6.1.4.1.2021.255 /bin/sh /usr/local/local/passtest
  415.  
  416. # % snmpwalk -v 1 localhost -c public .1.3.6.1.4.1.2021.255
  417. # enterprises.ucdavis.255.1 = "life the universe and everything"
  418. # enterprises.ucdavis.255.2.1 = 42
  419. # enterprises.ucdavis.255.2.2 = OID: 42.42.42
  420. # enterprises.ucdavis.255.3 = Timeticks: (363136200) 42 days, 0:42:42
  421. # enterprises.ucdavis.255.4 = IpAddress: 127.0.0.1
  422. # enterprises.ucdavis.255.5 = 42
  423. # enterprises.ucdavis.255.6 = Gauge: 42
  424. #
  425. # % snmpget -v 1 localhost -c public .1.3.6.1.4.1.2021.255.5
  426. # enterprises.ucdavis.255.5 = 42
  427. #
  428. # % snmpset -v 1 localhost -c public .1.3.6.1.4.1.2021.255.1 s "New string"
  429. # enterprises.ucdavis.255.1 = "New string"
  430. #/usr/src/redhat/RPMS/i386/1030snmp-2.7-1.i386.rpm
  431.  
  432. # For specific usage information, see the man/snmpd.conf.5 manual page
  433. # as well as the local/passtest script used in the above example.
  434.  
  435. # Added for support of bcm5820 cards.
  436. pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat
  437.  
  438. ###############################################################################
  439. # Further Information
  440. #
  441. # See the snmpd.conf manual page, and the output of "snmpd -H".
  442.  
  443. # This pass is required for MegaRAID SCSI/iSCSI SNMP
  444.  
  445. pass .1.3.6.1.4.1.3582 /usr/sbin/lsi_mrdsnmpmain
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement