Add UCI section general which holds the uci parameter network defining on
which interface(s) the snmp agent is reachable for inbound snmp requests
in case the firewall zone does not allow INPUT traffic by default.
For the different zones to which the different interfaces belong firewall
procd input rules are created making the snmp agent reachable on udp port
161.
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
According to the snmpd.conf man page, the engineID of an snmp agent
should be consistent through time. However, it seems that the engineID
changes every reboot. Add options to configure how the engineID is
generated. The default setting generates it based on the MAC address of
the eth0 interface.
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
When applying wireless configuration changes, the ifindex of the
wireless interface(s) change. While snmpd picks up the new interfaces
with the correct index, it does not remove the old ones:
IF-MIB::ifName.23 = STRING: wlan0
IF-MIB::ifName.24 = STRING: wlan1
IF-MIB::ifName.25 = STRING: wlan0
IF-MIB::ifName.26 = STRING: wlan1
This causes problems for monitoring tools that use ifName (or ifDesc) as
interface reference. Add a trigger that reloads snmpd on interface
up/down events so that it will no longer have the old interfaces.
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
When an ifindex for an interface changes, some monitoring tools can no
longer find the interface and send alerts. Monitor all network
interfaces via the procd netdev parameter, so that
/etc/init.d/snmpd reload will restart snmpd if any ifindex changed.
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
- Refactor RUN_C into CONFIGFILE, as used in dnsmasq and igmpproxy init
scripts.
- Add a newline after each function definition.
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
add support for "disk <partition> <size>" option
example for /etc/config/snmpd
===========
config disk
option partition '/'
option size '500'
===========