monitoring the IP virtual server services (lvs)

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
stigmata
Posts: 49
Joined: Tue Nov 23, 2004 10:26 am

monitoring the IP virtual server services (lvs)

Post by stigmata »

Hi,

is there anybody who use lvs? I found some things about lvs-snmp but I can't compile the module on my gentoo-box.... and the development of lvs-snmp ended in 2002?!?! :-/

XML File and template: http://www.asyd.net/cacti/
lvs-snmp: http://anakin.swiss-support.net/~romeo/lvs-snmp/

Is there any way to monitor the lvs connections in cacti?

Best regards,
oliver
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Almost anything is possible, just have to figure it out.

Maybe a script would work better, I don't know, I didn't review the links.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
transnet
Posts: 10
Joined: Thu Feb 02, 2006 5:42 am

Post by transnet »

Hi

has anyone a solution here?

i would be interested in it too


cu
Fabian
ck
Posts: 1
Joined: Wed Aug 02, 2006 2:28 am

Working on RHEL 4.3

Post by ck »

Actually it's CentOS. Anyways, this was a bit laborious, so maybe it might help other folks. Here was the process I used:

1. download the LVS-snmp tarball as specified at http://kb.linuxvirtualserver.org/wiki/N ... LVS-Module

2. Download the source for the ipvsadm you're using. I use the redhat cluster source rpm for this, as provided by centos at http://mirror.centos.org/centos-4/4.3/csgfs/SRPMS/ or your equivalent mirror

3. Ensure you have the kernel-devel package installed.

4. Unpack the LVS-snmp package someplace.

5. Unpack the ipvsadm source rpm using rpmbuild -bp, which dumps it into /usr/src/redhat/BUILD/ipvsadmin-X or some such.

6. Delete the libipvs directory from the LVS-snmp src dir.

7. Copy the kernheaders and libipvs directories from the ipvsadm source into the LVS-snmp top-level src dir.

8. Edit the LVS-snmp top-level Makefile. You'll want to change the CFLAGS to be as follows:
CFLAGS := `net-snmp-config --cflags` -Ilibipvs -Ikernheaders -I/usr/src/kernels/[your version]/include -Wall -g

Put in whatever version of kernel-devel you have installed there where it says [your version].

9. Build it using make


From there it's pretty much how the README for the LVS-snmp stuff reads. Briefly:

1. Copy the resulting lvs.so to /usr/lib/libnetsnmplvs.so

2. Copy the mibs in the top-level dir to /usr/share/snmp/mibs/

3. Edit /etc/snmp/snmpd.conf and add the following line:
dlmod lvs /usr/lib/libnetsnmplvs.so

4. Test it using the commands from the LVS-snmp readme.


Once you've confirmed it's working, you can import into cacti using the files specified at http://www.asyd.net/cacti/. You'll have to push the snmp-lvs.xml to [path-cacti]/resources/snmp_queries, then import the cacti_data_query_snmp_lvs.xml into cacti using 'import data query'
transnet
Posts: 10
Joined: Thu Feb 02, 2006 5:42 am

Post by transnet »

Hi there

Apparently this stuff is working unter debian/sarge , but under debian/etch all i get is

LVS-MIB::lvsVersion.0 = STRING: "0.0.0"
LVS-MIB::lvsNumServices.0 = INTEGER: 0
LVS-MIB::lvsHashTableSize.0 = INTEGER: 0


when i do a snmpwalk -c public -v 2c -m LVS-MIB localhost 1.3.6.1.4.1.8225.4711


anyone any ideas?

Fab
jmeredith
Posts: 1
Joined: Mon Dec 15, 2008 11:31 am
Location: Denver

transet - you were so close

Post by jmeredith »

I hope it isn't a couple of months too late.

The problem is that under debian snmpd drops permissions and runs as the snmp user. When it tries to talk to the IPVS module in the kernel it cannot open the raw socket it needs.

A solution is to remove '-u snmp' from /etc/default/snmp. This works, but you then end up running SNMP as root, which may be acceptable for you depending on your network conditions.

The better solution would be to change the NetSNMP source to use the Linux capabilities interface so that when snmpd drops permissions it keeps NET_RAW so it can open the socket even as snmp.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests