LVS SNMP (ucd-snmp-lvs-module-0.0.2) that compiles on RedHat ES4 and Fedora Core 3

This is patched ucd-snmp-lvs-module-0.0.2 (original sources can be downloaded from http://anakin.swiss-support.net/~romeo/lvs-snmp) that compile and run on RHES4 and FC3.
ucd-snmp-lvs-module is for LVS linux loadbalancer SNMP monitoring.

Download patch for ucd-snmp-lvs-module-0.0.2 ucd-snmp-lvs-module-0.0.2.patch
or download patched sources ucd-snmp-lvs-module-0.0.2a.tar.gz

If you use patch, then:
  • download original sources from http://anakin.swiss-support.net/~romeo/lvs-snmp/ucd-snmp-lvs-module-0.0.2.tar.bz2
  • unpack it and copy patch to its directory
  • patch -p1 < ucd-snmp-lvs-module-0.0.2.patch
    Compiles and runs on:
    - Red Hat Enterprise Linux ES release 4 (Nahant)
     * libipvs from ipvsadm-1.24  
             2 files are needed from libipvs:
             /usr/include/ipvs/libipvs.h 
             /usr/lib/libipvs.a
     * kernel 2.6.14.1  (/usr/src/linux/include/net/ip_vs.h is needed)
     * net-snmp-5.1.2-11.i386.rpm
     * net-snmp-devel-5.1.2-11.i386.rpm
     * net-snmp-libs-5.1.2-11.i386.rpm 
     * lm_sensors-devel-2.8.7-2.i386.rpm
    
    
    - Fedora Core release 3 (Heidelberg)
    net-snmp-5.1.2-11.i386.rpm
    net-snmp-devel-5.1.2-11.i386.rpm
    
    
    The installation process that worked for me (mainly these are instructions from original README
    in the package, but here paths and snmpwalk arguments are different):
    
    1. Compile libipvs:
    	download ipvsadm-1.24.tar.gz
    	tar zxvf ipvsadm-1.24.tar.gz && cd ipvsadm-1.24/libipvs
    	make
    	cp libipvs.h /usr/include/ipvs
    	cp libipvs.a /usr/lib
    
    2. Compile ucd-snmp-lvs-module-0.0.2a
    	make && make install
    3. Add following line to /etc/snmp/snmpd.conf
    	dlmod lvs /usr/local/share/snmp/dlmodules/lvs.so 
    4. Copy mibs:
    	cp OC-MIB.txt LVS-MIB.txt  /usr/share/snmp/mibs/
    5. Add following line to /etc/snmp/snmp.conf
    	mibs +OC-MIB:LVS-MIB
    
    6. Insmod ip_vs and (optionally) create some VIP definition
    7. Run snmpd:
    	/usr/sbin/snmpd  -f -V -L -Dlvs 
    8. Run snmpwalk:
    	snmpwalk -Os -c public -v 2c localhost enterprises.opencon.lvs	
    
    NOTE: if you have fresh snmpd.conf then probably you will see snmpwalk output:
    lvs = No more variables left in this MIB View (It is past the end of the MIB tree)
    
    You can add following lines to snmpd.conf ('+' marks which line was added).
    This is an example and you should be very careful in granting access to your snmp
    coz potentially it can be a security issue:
    
    +view all    included  .1
    view    systemview    included   .1.3.6.1.2.1.1
    
    +access  notConfigGroup ""      any       noauth    exact  all none none
    access  notConfigGroup ""      any       noauth    exact  systemview none none
    
    
    8a. Restart snmpd and run snmpwalk again.
    
    
    TODO: fix error in snmpd output?
    last realserver in service reached!lvs: previous oid overshooten will break now!