shell> snmptranslate -m LVS-MIB -On -IR lvsServiceEntry
Nom de fichier | Taille | l'heure | Télécharger compter |
net-snmp-lvs-module_0.1.0-1_amd64.deb | 18.4 k | 2014-08-25 21:36:35 | 106 |
net-snmp-lvs-module_0.1.0-1_i386.deb | 17.87 k | 2014-08-25 21:36:35 | 69 |
net-snmp-lvs-module_0.1.0-1.debian.tar.xz | 2.19 k | 2014-08-25 21:36:35 | 57 |
net-snmp-lvs-module-0.1.0.tar.gz | 18.22 k | 2014-08-25 21:36:28 | 130 |
Net-snmp-lvs-module-0.0.4.tar.gz | 10.18 k | 2014-08-25 21:36:00 | 119 |
Révision | l'heure | Auteur | Message: RSS |
cfd673bd | 2014-08-25 21:22:28 | Tatsuki Sugiura | Use tag for archive generation. |
f81b027c | 2014-08-25 20:34:55 | Tatsuki Sugiura | Use gcc as linker for __stack_chk_fail_local error on 32b... |
9c5a415d | 2014-08-25 20:34:51 | Tatsuki Sugiura | Update readme filename. |
cb356857 | 2014-08-25 20:34:46 | Tatsuki Sugiura | Add config for git-buildpackage. |
7842f10e | 2014-08-25 20:34:39 | Tatsuki Sugiura | Update doc filename. |
c6e305c4 | 2014-08-25 20:34:10 | Tatsuki Sugiura | Merge branch 'master' into debian |
ec2494b1 | 2014-08-25 04:01:54 | Tatsuki Sugiura | Update readme. |
96b28963 | 2014-08-14 15:43:35 | Tatsuki Sugiura | Add snmp-mibs-downloader to recommends and update readme. |
cf65e825 | 2014-08-14 15:22:48 | Tatsuki Sugiura | Add dpkg-dev to build depends by lintian. |
7def9cec | 2014-08-14 15:21:29 | Tatsuki Sugiura | Add snmpd to recommends. |
net-snmp-lvs-module is a dynamicaly loadable shared object to get the configuration and some statistical information from the Linux kernel with IP virtual server support (also known as Linux Virtual Server).
Install net-snmp and its development headers and libraries. Install netlink and its development headers and libraries. Invoke make, this should build lvs.so.
Copy LVS-MIB.txt and OC.txt to /usr/share/snmp/mibs/ Check that the new MIB is visible by invoking
shell> snmptranslate -m LVS-MIB -On -IR lvsServiceEntry
This should return .1.3.6.1.4.1.8225.4711.18.1.
Copy lvs.so to /usr/lib/libnetsnmplvs.so and add the following line to /etc/snmp/snmpd.conf and restart your snmpd.
dlmod lvs /usr/lib/libnetsnmplvs.so
Note
|
You may need to change to run snmpd as root to get ipvs information. |
Try if everything works invoking:
shell> snmpwalk -c public -v 2c -m LVS-MIB localhost 1.3.6.1.4.1.8225.4711
LVS-MIB::lvsVersion.0 = STRING: "1.2.0"
LVS-MIB::lvsNumServices.0 = INTEGER: 2
LVS-MIB::lvsHashTableSize.0 = INTEGER: 4096
LVS-MIB::lvsTcpTimeOut.0 = INTEGER: 900
LVS-MIB::lvsTcpFinTimeOut.0 = INTEGER: 120
LVS-MIB::lvsUdpTimeOut.0 = INTEGER: 300
LVS-MIB::lvsDaemonState.0 = INTEGER: none(0)
...
In case you want to add additional snmp-values to your MIB: Set export MIBS=ALL and create skeleton with
shell> mib2c -c mib2c.interate.conf lvsRealTable
or
shell> mib2c -c mib2c.interate.conf lvsServiceTable
this should create a file lvsRealTable.c and/or lvsServiceTable.c. Use the generated code as a template for lvs.c and populate the missing parts.
The code for this module is based on ucd-snmpd-lvs written by Romeo Benzoni in 2002 and never modified since. As that code did not compile with the newer net-snmp headers, I decided to rewrite the complete code. The only unchanged parts from the ucd-snmpd-lvs project are LVS-MIB.txt and OC.txt.
On 2014, updates for 64bit environments, ipvsadm 1.26 (nl-3 patched) and net-snmp 5.7.2 by Tatsuk Sugiura.
You can get original source code from LVS wiki; http://kb.linuxvirtualserver.org/wiki/Net-SNMP-LVS-Module
Jacob Rief <jacob.rief@tiscover.com> Jan, 2nd 2006
Tatsuki Sugiura <sugi@nemui.org> Aug 2014
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Welcome to OSDN Wiki system. Here is your chamber Wiki space.
Check Wiki Guide (English) to refer syntax and functions.
[PageInfo]
(auto generated page)
[Permissions]
view:all, edit:admins, delete/config:admins