mini-snmpd.conf —
configuration file for mini-snmpd
mini-snmpd.conf is the optional configuration
file for
mini-snmpd(8),
read at start-up and again on
SIGHUP. The
default path is
/etc/mini-snmpd.conf,
override it with
-f. The file is only
supported when
mini-snmpd is built with
libConfuse; without it all settings are given on the command line.
Settings combine with the command line rather than replacing it: a scalar
present in the file overrides the matching command-line option, the list
settings are appended to what
-d,
-i, and
-T provided, and a key left out of the file
keeps its command-line value.
The syntax is that of libConfuse: one
key
= value per line,
string values in double quotes, lists as a brace-enclosed, comma-separated
set. Anything after a ‘
#’ is a comment.
-
STR
- Community string, default “public”. Same as
-c.
authentication
true|false
- Require the community string to match, thus SNMP version 2c, default
false. Same as
-a.
location
STR
- sysLocation, default empty. Same as
-L.
contact
STR
- sysContact, default empty. Same as
-C.
description
STR
- sysDescr. If unset, the
PRETTY_NAME from
os-release(5)
is used. Same as
-D.
vendor
OID
- sysObjectID, the vendor OID, default
.1.3.6.1.4.1. Same as
-V.
timeout
SEC
- Interval between MIB value updates, in seconds, default 1. Same as
-t.
disk-table
{ DIR, ...
}
- Mount points to report in
UCD-SNMP-MIB::dskTable, default
‘
/’. Adds to any
-d.
iface-table
{ IFNAME, ...
}
- Interfaces to report in the IF-MIB. A trailing
‘
+’ is a prefix wildcard, iptables
style, e.g. ‘eth+’; a lone
‘+’ matches all. With no entry, all
interfaces are monitored, loopback first. Adds to any
-i.
trap-table
{ ADDR[:PORT],
... }
- SNMPv2c trap sinks, default port 162, IPv6 as
‘
[addr]:port’. Adds to any
-T.
A
custom section serves a fixed string on any
OID, e.g. to emulate the responses of another device. The section title is the
OID, in leading-dot form:
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;"
}
Up to eight
custom sections are supported; an
OID already served by a built-in MIB is rejected.
Unless built with
--disable-ethtool, one or
more
ethtool sections map driver statistics
onto IF-MIB counters for the matching interfaces:
ethtool "eth*" {
rx_bytes = ifInOctets
rx_packets = ifInUcastPkts
tx_bytes = ifOutOctets
tx_packets = ifOutUcastPkts
}
The section title is a shell-style glob matched against the interface name; each
key names an ethtool driver statistic and each value the IF-MIB object it
feeds.
- /etc/mini-snmpd.conf
- default configuration file
community = "public"
authentication = true
location = "Exampleville Site 1."
contact = "ops@example.com"
description = "NAS monitor"
timeout = 1
disk-table = { "/", "/var" }
trap-table = { "192.0.2.1", "[2001:db8::1]:1620" }
mini-snmpd(8)
mini-snmpd(8) is
maintained by Joachim Wiberg ⟨mailto:troglobit@gmail.com⟩ at
GitHub.