LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: About SNMP/MIB for LVS (IPVS)

To: Madhusudhan Hebbar <madhusudhan.hebbar@xxxxxxxxxxxxxxxx>, <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: About SNMP/MIB for LVS (IPVS)
From: Roberto Nibali <ratz@xxxxxxxxxxxx>
Date: Thu, 19 Jan 2006 21:56:59 +0100
Is there a SNMP agent already developed for LVS?

Nope.

There was an earlier one lvs-snmp (done using ucd-snmp) that was contributed
by
http://anakin.swiss-support.net/~romeo/lvs-snmp/

Is the above program, the only agent program for LVS SNMP?

So far yes.

I was wondering whether the SNMP agent for LVS with information about IPVS
(Indicating about Virtual services and real servers) is already bundled in
the IPVS module.

I was checking the file <linux/snmp.h>
It has MIB information about ICMP, TCP, UDP etc but does not have on IPVS.

This file represents the SNMP RFCs, IPVS is not specified in an RFC, so adding this has no chance I believe.

Suppose IPVS MIB/SNMP information is not bundled along with the
distribution, and if we need to develop a fresh SNMP Agent for LVS (IPVS),
what would be the best way to do so?

Generate an own MIB, use one of the reserved sub trees of the MIB DB for such projects and peruse m2c. If you really plan on writing one, get back to us so we can sort out the header to freeze the API.

I am a little confused about what has to be done if I need IPVS information
in SNMP.

Well, there is a very simple approach we've been using for years:

1. Prepare the values through cronjobs by calling ipvsadm or parsing
   proc-fs and write SNMP type values (u32, u64, char ...) into single
   files (for example: /var/run/lvs_snmp/VIP1_act_conns.out).
2. Configure snmpd.conf to read out those files using cat, like so for
   example:

   exec VIP1_act_conns /bin/cat /var/run/lvs_snmp/VIP1_act_conns.out

3. Use snmpwalk and grep for VIP1_act_conns to get the OID and off you
   go monitoring those values.

4. Repeat for all values you would like to poll.

If you need up to date values (not recommended though) you can also directly call shell scripts using the exec directive.

Easy as eating an apple pie,
Roberto Nibali, ratz
--
echo '[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq' | dc

<Prev in Thread] Current Thread [Next in Thread>