I recently stated using Cacti at work to monitor several servers (Linux, AIX and AS/400), so I decided to use it at home just for fun (sort of geek, eh?), but I couldn't find an addon for IPCop, as snmpd is not included in standard distribution; so I built it myself, following and fixing directions found in this forum, and now I'm going to share it.
This addon was initially built grabbing some files from Debian snmp distribution packages, writing two scripts (install and uninstall) and packaging it all together. Now it's built from sources.
Lately, I came across this post, and I started monitoring disk I/O performance, but soon I realized that IPCop doesn't publish such informations in /proc/partitions. So I've recompiled the kernel with “the right flag” enabled and you'll find the patch below.
To install this addon, simply execute these commands:
cd /wherever/you/downloaded tar zxf ipcop-snmpd-x.y.z.tgz cd ipcop-snmpd ./install
To remove this addon, you should issue these commands:
cd /wherever/you/downloaded tar zxf ipcop-snmpd-x.y.z.tgz cd ipcop-snmpd ./uninstall
Once installed, you have to create the configuration file, /var/ipcop/snmp/snmpd.conf. Now this can be done using your browser: simply choose “SNMP” from the “Services” menu. This is a really, really minimal configuration, but worked for me; use it with caution: I'm no SNMP guru at all.
com2sec readonly default [readonly_community_name] group MyROGroup v1 readonly group MyROGroup v2c readonly group MyROGroup usm readonly view all included .1 80 access MyROGroup "" any noauth exact all none none syslocation [ipcop_box_location] syscontact [you] <[your@email.address]>
Once you're done, you have to (re)start the SNMP daemon using the right button.
You can also decide to automatically start SNMP daemon on IPCop boot; tick the corresponding checkbox and save the configuration.
Some time ago I tried to monitor an IPCop box through a VPN tunnel, but I went into troubles: I could see requests entering the IPCop box and answers trying to leave it, but through the wrong interface.
The problem is caused by SNMPd behaviour: it tries to answer requests using (as source address) the address of the interface through which the request came. In case of a VPN link, the interface is “ipsec0”, which shares its address with the RED interface while the tunnel is ended on one of the internal networks (GREEN, ORANGE, …); this results in answers trying to get through the tunnel using a “foreign” source IP address (the RED's one) and so getting lost.
To solve this, you have to force SNMPd to listen only on “tunneled” interfaces (GREEN, ORANGE, …) adding this line in snmpd.conf:
agentaddress <tunneled_ip_address>:161
replacing <tunneled_ip_address> with the IP address of the interface which is part of the VPN tunnel.
This addon has currently been translated into these languages:
If your language is not listed here, you can contribute; it's simple:
If you wish, I can add your name and a link to your homepage.
1.3.3 - Rebuilt net-snmp with support for ucd-snmp/diskio ucd-snmp/lmSensors. - Added integration with lm-sensors addon. 1.3.2a - Fixed some typos in snmpctrl.sh. Thanks to Ray Ellison for sending me the patches. - Fixed an extra "else" in rc.netaddress.up patch during install. 1.3.1 - Upgraded to net-snmp 5.4.2.1. 1.3.0 - Upgraded to net-snmp 5.4.1 built from source. Previous versions were extracted by debian (sarge) packages, no longer available. - Added a (minimal) GUI to manage snmpd.conf - Added SNMPd in log viewer 1.2.1 - Fixed a small bug which prevented snmpd startup on reboot 1.2.0 - Updated the binaries using snmpd 5.2.3 and related libraries - Added SNMPD service to System Status - Moved configuration file from /etc/snmp to /var/ipcop/snmp for coherence - Added "restartsnmp" command 1.1.0 - Added MIBs missing in first release - Renamed snmpd.conf to avoid overwriting during upgrade 1.0.1 - Modified rc.local to enable logging and pid file 1.0.0 - First release