/contrib/bsnmp/snmpd/snmpd.config

https://bitbucket.org/freebsd/freebsd-head/ · Unknown · 103 lines · 91 code · 12 blank · 0 comment · 0 complexity · 2b859774bfe8e59e361bdcb852d74579 MD5 · raw file

  1. #
  2. # Copyright (c) 2001-2003
  3. # Fraunhofer Institute for Open Communication Systems (FhG Fokus).
  4. # All rights reserved.
  5. #
  6. # Author: Harti Brandt <harti@freebsd.org>
  7. #
  8. # Redistribution and use in source and binary forms, with or without
  9. # modification, are permitted provided that the following conditions
  10. # are met:
  11. # 1. Redistributions of source code must retain the above copyright
  12. # notice, this list of conditions and the following disclaimer.
  13. # 2. Redistributions in binary form must reproduce the above copyright
  14. # notice, this list of conditions and the following disclaimer in the
  15. # documentation and/or other materials provided with the distribution.
  16. #
  17. # THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  18. # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  19. # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  20. # ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
  21. # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  22. # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  23. # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  24. # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  25. # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  26. # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  27. # SUCH DAMAGE.
  28. #
  29. # $Begemot: bsnmp/snmpd/snmpd.config,v 1.16 2006/02/14 09:04:20 brandt_h Exp $
  30. #
  31. # Example configuration file.
  32. #
  33. #
  34. # Set some common variables
  35. #
  36. host := foo.bar.com
  37. location := "Room 200"
  38. contact := "sysmeister@bar.com"
  39. system := 1 # FreeBSD
  40. traphost := noc.bar.com
  41. trapport := 162
  42. read := "public"
  43. # Uncomment the line below that sets the community string
  44. # to enable write access.
  45. write := "geheim"
  46. trap := "mytrap"
  47. #
  48. # Configuration
  49. #
  50. %snmpd
  51. begemotSnmpdDebugDumpPdus = 2
  52. begemotSnmpdDebugSyslogPri = 7
  53. #
  54. # Set the read and write communities.
  55. #
  56. # The default value of the community strings is NULL (note, that this is
  57. # different from the empty string). This disables both read and write access.
  58. # To enable read access only the read community string must be set. Setting
  59. # the write community string enables both read and write access with that
  60. # string.
  61. #
  62. # Be sure to understand the security implications of SNMPv2 - the community
  63. # strings are readable on the wire!
  64. #
  65. begemotSnmpdCommunityString.0.1 = $(read)
  66. # begemotSnmpdCommunityString.0.2 = $(write)
  67. begemotSnmpdCommunityDisable = 1
  68. # open standard SNMP ports
  69. begemotSnmpdPortStatus.[$(host)].161 = 1
  70. begemotSnmpdPortStatus.127.0.0.1.161 = 1
  71. # open a unix domain socket
  72. begemotSnmpdLocalPortStatus."/var/run/snmpd.sock" = 1
  73. begemotSnmpdLocalPortType."/var/run/snmpd.sock" = 4
  74. # send traps to the traphost
  75. begemotTrapSinkStatus.[$(traphost)].$(trapport) = 4
  76. begemotTrapSinkVersion.[$(traphost)].$(trapport) = 2
  77. begemotTrapSinkComm.[$(traphost)].$(trapport) = $(trap)
  78. sysContact = $(contact)
  79. sysLocation = $(location)
  80. sysObjectId = 1.3.6.1.4.1.12325.1.1.2.1.$(system)
  81. snmpEnableAuthenTraps = 2
  82. #
  83. # Load MIB-2 module
  84. #
  85. begemotSnmpdModulePath."mibII" = "/usr/local/lib/snmp_mibII.so"
  86. #
  87. # Netgraph module
  88. #
  89. begemotSnmpdModulePath."netgraph" = "/usr/local/lib/snmp_netgraph.so"
  90. %netgraph
  91. begemotNgControlNodeName = "snmpd"