mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-28 04:50:36 -09:00
package/mini-snmpd: enable optional .conf and ethtool support
Both libConfuse and ethtool support is relatively new features. Enable optional support for them, including an example /etc/mini-snmpd.conf Signed-off-by: Joachim Wiberg <troglobit@gmail.com> Signed-off-by: Julien Olivain <ju.o@free.fr>
This commit is contained in:
committed by
Julien Olivain
parent
54485e075d
commit
8aca1f26c1
@@ -4,4 +4,19 @@ config BR2_PACKAGE_MINI_SNMPD
|
||||
Mini SNMPd is a minimal implementation targeted at small or
|
||||
embedded UNIX systems with limited resources
|
||||
|
||||
http://troglobit.com/mini-snmpd.html
|
||||
Enable BR2_PACKAGE_LIBCONFUSE for /etc/mini-snmpd.conf support
|
||||
with an example file. Also enabling BR2_PACKAGE_ETHTOOL adds
|
||||
ethtool-based interface statistics.
|
||||
|
||||
https://troglobit.com/mini-snmpd.html
|
||||
|
||||
if BR2_PACKAGE_MINI_SNMPD
|
||||
|
||||
config BR2_PACKAGE_MINI_SNMPD_INTERFACES
|
||||
int "Number of network interfaces"
|
||||
default 8
|
||||
range 1 256
|
||||
help
|
||||
Max number of network interfaces exposed in IF-MIB::ifTable
|
||||
|
||||
endif
|
||||
|
||||
36
package/mini-snmpd/mini-snmpd.conf
Normal file
36
package/mini-snmpd/mini-snmpd.conf
Normal file
@@ -0,0 +1,36 @@
|
||||
# Require client authentication (SNMP v2c)
|
||||
authentication = true
|
||||
community = "public"
|
||||
|
||||
# Descriptive MIB-II system.* values, shown by snmpwalk
|
||||
#location = "Server room, rack 4"
|
||||
#contact = "ops@example.com"
|
||||
#description = "Acme Gateway 3000"
|
||||
|
||||
# Vendor OID tree (enterprises.*)
|
||||
#vendor = ".1.3.6.1.4.1"
|
||||
|
||||
# MIB poll timeout, seconds
|
||||
#timeout = 1
|
||||
|
||||
# Mount points to expose in UCD-SNMP-MIB::dskTable
|
||||
#disk-table = { "/", "/var" }
|
||||
|
||||
# Interfaces to expose in IF-MIB::ifTable
|
||||
#iface-table = { "eth0", "eth1" }
|
||||
|
||||
# SNMPv2 trap sinks
|
||||
#trap-table = { "192.0.2.1", "[2001:db8::1]:1620" }
|
||||
|
||||
# Emulate the respons of another device
|
||||
# custom ".1.3.6.1.4.1.11.2.3.9.1.1.7.0" {
|
||||
# value = "MFG:Hewlett-Packard;MDL:HP LaserJet 1020;CLS:PRINTER;"
|
||||
#}
|
||||
|
||||
# Map ethtool stats to IF-MIB counters:
|
||||
#ethtool "eth*" {
|
||||
# rx_bytes = ifInOctets
|
||||
# rx_packets = ifInUcastPkts
|
||||
# tx_bytes = ifOutOctets
|
||||
# tx_packets = ifOutUcastPkts
|
||||
#}
|
||||
@@ -11,6 +11,25 @@ MINI_SNMPD_LICENSE_FILES = COPYING
|
||||
MINI_SNMPD_CPE_ID_VENDOR = minisnmpd_project
|
||||
MINI_SNMPD_CPE_ID_PRODUCT = minisnmpd
|
||||
MINI_SNMPD_DEPENDENCIES = host-pkgconf
|
||||
MINI_SNMPD_CONF_OPTS = --with-interfaces=$(BR2_PACKAGE_MINI_SNMPD_INTERFACES)
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBCONFUSE),y)
|
||||
MINI_SNMPD_DEPENDENCIES += libconfuse
|
||||
MINI_SNMPD_CONF_OPTS += --with-config
|
||||
# ethtool interface stats live in linux_ethtool.c, only built with libConfuse
|
||||
ifeq ($(BR2_PACKAGE_ETHTOOL),y)
|
||||
MINI_SNMPD_CONF_OPTS += --enable-ethtool
|
||||
else
|
||||
MINI_SNMPD_CONF_OPTS += --disable-ethtool
|
||||
endif
|
||||
define MINI_SNMPD_INSTALL_CONFIG
|
||||
$(INSTALL) -D -m 644 package/mini-snmpd/mini-snmpd.conf \
|
||||
$(TARGET_DIR)/etc/mini-snmpd.conf
|
||||
endef
|
||||
MINI_SNMPD_POST_INSTALL_TARGET_HOOKS += MINI_SNMPD_INSTALL_CONFIG
|
||||
else
|
||||
MINI_SNMPD_CONF_OPTS += --without-config
|
||||
endif
|
||||
|
||||
define MINI_SNMPD_INSTALL_ETC_DEFAULT
|
||||
$(INSTALL) -D -m 644 package/mini-snmpd/mini-snmpd \
|
||||
|
||||
Reference in New Issue
Block a user