Add startup script and default configuration file for bsnmpd.
Reviewed by: harti
This commit is contained in:
parent
3033cea56c
commit
8d6e44f80f
@ -13,8 +13,8 @@ BIN1= amd.map apmd.conf auth.conf \
|
||||
mac.conf motd netconfig network.subr networks newsyslog.conf \
|
||||
pf.conf pf.os phones profile protocols \
|
||||
rc rc.bsdextended rc.firewall rc.firewall6 rc.sendmail rc.shutdown \
|
||||
rc.subr remote rpc services \
|
||||
shells sysctl.conf syslog.conf usbd.conf \
|
||||
rc.subr remote rpc services shells \
|
||||
snmpd.config sysctl.conf syslog.conf usbd.conf \
|
||||
etc.${MACHINE_ARCH}/ttys \
|
||||
${.CURDIR}/../gnu/usr.bin/man/manpath/manpath.config \
|
||||
${.CURDIR}/../usr.bin/mail/misc/mail.rc \
|
||||
|
@ -247,6 +247,12 @@ nis_ypxfrd_flags="" # Flags to rpc.ypxfrd (if enabled).
|
||||
nis_yppasswdd_enable="NO" # Run rpc.yppasswdd at boot time (or NO).
|
||||
nis_yppasswdd_flags="" # Flags to rpc.yppasswdd (if enabled).
|
||||
|
||||
### SNMP daemon ###
|
||||
# Be sure to understand the security implications of running SNMP v1/v2
|
||||
# in your network.
|
||||
bsnmpd_enable="NO" # Run the SNMP daemon (or NO).
|
||||
bsnmpd_flags="" # Flags for bsnmpd.
|
||||
|
||||
### Network routing options: ###
|
||||
defaultrouter="NO" # Set to default gateway (or NO).
|
||||
static_routes="" # Set to static route list (or leave empty).
|
||||
|
@ -4,7 +4,7 @@
|
||||
FILES= DAEMON LOGIN NETWORKING SERVERS \
|
||||
abi accounting addswap adjkerntz amd \
|
||||
apm apmd archdep atm1 atm2 atm3 \
|
||||
bgfsck bootparams \
|
||||
bgfsck bootparams bsnmpd \
|
||||
ccd cleanvar cleartmp cron \
|
||||
devd devfs dhclient \
|
||||
dmesg dumpon \
|
||||
|
18
etc/rc.d/bsnmpd
Normal file
18
etc/rc.d/bsnmpd
Normal file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
# PROVIDE: bsnmpd
|
||||
# REQUIRE: NETWORKING syslogd
|
||||
# KEYWORD: nojail
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="bsnmpd"
|
||||
rcvar=`set_rcvar`
|
||||
command="/usr/sbin/${name}"
|
||||
pidfile="/var/run/snmpd.pid"
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
67
etc/snmpd.config
Normal file
67
etc/snmpd.config
Normal file
@ -0,0 +1,67 @@
|
||||
# $FreeBSD$
|
||||
#
|
||||
# Example configuration file for bsnmpd(1).
|
||||
#
|
||||
|
||||
#
|
||||
# Set some common variables
|
||||
#
|
||||
host := foo.bar.com
|
||||
location := "Room 200"
|
||||
contact := "sysmeister@bar.com"
|
||||
system := 1 # FreeBSD
|
||||
traphost := noc.bar.com
|
||||
trapport := 162
|
||||
|
||||
# Change this!
|
||||
read := "public"
|
||||
write := "geheim"
|
||||
trap := "mytrap"
|
||||
|
||||
#
|
||||
# Configuration
|
||||
#
|
||||
%snmpd
|
||||
begemotSnmpdDebugDumpPdus = 2
|
||||
begemotSnmpdDebugSyslogPri = 7
|
||||
|
||||
begemotSnmpdCommunityString.0.1 = $(read)
|
||||
begemotSnmpdCommunityString.0.2 = $(write)
|
||||
begemotSnmpdCommunityDisable = 1
|
||||
|
||||
# open standard SNMP ports
|
||||
begemotSnmpdPortStatus.[$(host)].161 = 1
|
||||
begemotSnmpdPortStatus.127.0.0.1.161 = 1
|
||||
|
||||
# open a unix domain socket
|
||||
begemotSnmpdLocalPortStatus."/var/run/snmpd.sock" = 1
|
||||
begemotSnmpdLocalPortType."/var/run/snmpd.sock" = 4
|
||||
|
||||
# send traps to the traphost
|
||||
begemotTrapSinkStatus.[$(traphost)].$(trapport) = 4
|
||||
begemotTrapSinkVersion.[$(traphost)].$(trapport) = 2
|
||||
begemotTrapSinkComm.[$(traphost)].$(trapport) = $(trap)
|
||||
|
||||
sysContact = $(contact)
|
||||
sysLocation = $(location)
|
||||
sysObjectId = 1.3.6.1.4.1.12325.1.1.2.1.$(system)
|
||||
|
||||
snmpEnableAuthenTraps = 2
|
||||
|
||||
#
|
||||
# Load MIB-2 module
|
||||
#
|
||||
begemotSnmpdModulePath."mibII" = "/usr/lib/snmp_mibII.so"
|
||||
|
||||
#
|
||||
# Netgraph module
|
||||
#
|
||||
#begemotSnmpdModulePath."netgraph" = "/usr/lib/snmp_netgraph.so"
|
||||
#
|
||||
#%netgraph
|
||||
#begemotNgControlNodeName = "snmpd"
|
||||
|
||||
#
|
||||
# pf(4) module
|
||||
#
|
||||
#begemotSnmpdModulePath."pf" = "/usr/lib/snmp_pf.so"
|
Loading…
x
Reference in New Issue
Block a user