Revisión | c6e305c47b2de1d502eeb7256c308723b7a6e7fb (tree) |
---|---|
Tiempo | 2014-08-25 20:34:10 |
Autor | Tatsuki Sugiura <sugi@nemu...> |
Commiter | Tatsuki Sugiura |
Merge branch 'master' into debian
@@ -1,33 +1,57 @@ | ||
1 | +net-snmp-lvs-module | |
2 | +=================== | |
3 | + | |
1 | 4 | GENERAL |
5 | +------- | |
2 | 6 | |
3 | -net-snmpd-lvs-module is a dynamicaly loadable shared object to get the | |
7 | +net-snmp-lvs-module is a dynamicaly loadable shared object to get the | |
4 | 8 | configuration and some statistical information from the Linux kernel |
5 | 9 | with IP virtual server support (also known as Linux Virtual Server). |
6 | 10 | |
7 | 11 | INSTALLATION |
12 | +------------ | |
13 | + | |
14 | +Build | |
15 | +~~~~~ | |
8 | 16 | |
9 | 17 | Install net-snmp and its development headers and libraries. |
10 | 18 | Install netlink and its development headers and libraries. |
11 | 19 | Invoke 'make', this should build 'lvs.so'. |
12 | 20 | |
21 | +Install MIBs | |
22 | +~~~~~~~~~~~~ | |
23 | + | |
13 | 24 | Copy LVS-MIB.txt and OC.txt to /usr/share/snmp/mibs/ |
14 | 25 | Check that the new MIB is visible by invoking |
15 | 26 | |
16 | -shell> snmptranslate -m LVS-MIB -On -IR lvsServiceEntry, | |
27 | +-------------------------------------------------------- | |
28 | +shell> snmptranslate -m LVS-MIB -On -IR lvsServiceEntry | |
29 | +-------------------------------------------------------- | |
30 | + | |
31 | +This should return .1.3.6.1.4.1.8225.4711.18.1. | |
32 | + | |
17 | 33 | |
18 | -this should return .1.3.6.1.4.1.8225.4711.18.1 | |
34 | +Configure snmpd | |
35 | +~~~~~~~~~~~~~~~ | |
19 | 36 | |
20 | 37 | Copy lvs.so to /usr/lib/libnetsnmplvs.so and add the following line to |
21 | -/etc/snmp/snmpd.conf: | |
38 | +/etc/snmp/snmpd.conf and restart your snmpd. | |
39 | + | |
22 | 40 | --------------------------------------- |
23 | 41 | dlmod lvs /usr/lib/libnetsnmplvs.so |
24 | 42 | --------------------------------------- |
25 | -Restart your snmpd. | |
26 | 43 | |
27 | -Note: You need to run snmpd as root to get ipvs information. | |
44 | +[NOTE] | |
45 | +================================================================= | |
46 | +You may need to change to run snmpd as root to get ipvs information. | |
47 | +================================================================= | |
48 | + | |
49 | +Test | |
50 | +~~~~ | |
28 | 51 | |
29 | 52 | Try if everything works invoking: |
30 | 53 | |
54 | +-------------------------------------------------------- | |
31 | 55 | shell> snmpwalk -c public -v 2c -m LVS-MIB localhost 1.3.6.1.4.1.8225.4711 |
32 | 56 | |
33 | 57 | LVS-MIB::lvsVersion.0 = STRING: "1.2.0" |
@@ -38,20 +62,26 @@ LVS-MIB::lvsTcpFinTimeOut.0 = INTEGER: 120 | ||
38 | 62 | LVS-MIB::lvsUdpTimeOut.0 = INTEGER: 300 |
39 | 63 | LVS-MIB::lvsDaemonState.0 = INTEGER: none(0) |
40 | 64 | ... |
65 | +-------------------------------------------------------- | |
41 | 66 | |
42 | 67 | In case you want to add additional snmp-values to your MIB: |
43 | 68 | Set export MIBS=ALL and create skeleton with |
44 | 69 | |
70 | +-------------------------------------------------------- | |
45 | 71 | shell> mib2c -c mib2c.interate.conf lvsRealTable |
72 | +-------------------------------------------------------- | |
46 | 73 | |
47 | 74 | or |
48 | 75 | |
76 | +-------------------------------------------------------- | |
49 | 77 | shell> mib2c -c mib2c.interate.conf lvsServiceTable |
78 | +-------------------------------------------------------- | |
50 | 79 | |
51 | 80 | this should create a file lvsRealTable.c and/or lvsServiceTable.c. |
52 | 81 | Use the generated code as a template for lvs.c and populate the missing parts. |
53 | 82 | |
54 | -CREDITS | |
83 | +CREDITS / HISTORY | |
84 | +----------------- | |
55 | 85 | |
56 | 86 | The code for this module is based on ucd-snmpd-lvs written by Romeo Benzoni in |
57 | 87 | 2002 and never modified since. As that code did not compile with the newer |
@@ -61,11 +91,18 @@ parts from the ucd-snmpd-lvs project are LVS-MIB.txt and OC.txt. | ||
61 | 91 | On 2014, updates for 64bit environments, ipvsadm 1.26 (nl-3 patched) and |
62 | 92 | net-snmp 5.7.2 by Tatsuk Sugiura. |
63 | 93 | |
94 | +You can get original source code from LVS wiki; | |
95 | +http://kb.linuxvirtualserver.org/wiki/Net-SNMP-LVS-Module | |
96 | + | |
64 | 97 | AUTHOR |
65 | -Jacob Rief <jacob.rief@tiscover.com> Jan, 2nd 2006 | |
66 | -Tatsuki Sugiura <sugi@nemui.org> Aug 2014 | |
98 | +------ | |
99 | + | |
100 | + * Jacob Rief <jacob.rief@tiscover.com> Jan, 2nd 2006 | |
101 | + * Tatsuki Sugiura <sugi@nemui.org> Aug 2014 | |
67 | 102 | |
68 | 103 | LICENSE |
104 | +------- | |
105 | + | |
69 | 106 | This program is free software; you can redistribute it and/or modify |
70 | 107 | it under the terms of the GNU General Public License as published by |
71 | 108 | the Free Software Foundation; either version 2 of the License, or |
@@ -74,4 +111,4 @@ the Free Software Foundation; either version 2 of the License, or | ||
74 | 111 | This program is distributed in the hope that it will be useful, |
75 | 112 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
76 | 113 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
77 | -GNU General Public License for more details. | |
114 | +GNU General Public License for more details. | |
\ No newline at end of file |