aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2012-02-15 21:15:43 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2012-02-15 21:15:43 +0200
commit566876d7e586ab38a022859e83cbb28de349df3f (patch)
tree41763d8f1fdbceeb97c769b96251b7714a4ff4dd
parent4bd73756d717594e545f43ef21da7ca768bb7ad7 (diff)
downloadslb-566876d7e586ab38a022859e83cbb28de349df3f.tar.gz
slb-566876d7e586ab38a022859e83cbb28de349df3f.tar.bz2
Fix the docs.
* doc/Makefile.am (check-sub-config): Reflect the recent grecs upgrade. * doc/config.texi: Document new statements.
-rw-r--r--doc/Makefile.am2
-rw-r--r--doc/config.texi108
2 files changed, 83 insertions, 27 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am
index bac817d..fd22cbf 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -110,7 +110,7 @@ check-config:
$(info_TEXINFOS)
check-sub-config:
- @sed -n '/slb_kw\[\] *= *{/,/^}/{p}' ../src/config.c |tr '\n{' ' \n'|sed -n '/grecs_type_section/s/"\([^"]*\)".*grecs_type_section,[^,]*,[^,]*,[^,]*,[^,]*, *\(.*\) *}.*/\1 \2/p' | \
+ @sed -n '/slb_kw\[\] *= *{/,/^}/{p}' ../src/config.c |tr '\n{' ' \n'|sed -n '/grecs_type_section/s/"\([^"]*\)".*grecs_type_section,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*, *\(.*\) *}.*/\1 \2/p' | \
while read ident kw; do \
check-docs.sh "$$ident configuration statements" \
"/$$kw"'\[\] *= *{/,/^}/s/[ \t]*{ *"\([^,"]*\)".*/\1/pg' \
diff --git a/doc/config.texi b/doc/config.texi
index 7796c80..20e183b 100644
--- a/doc/config.texi
+++ b/doc/config.texi
@@ -846,30 +846,32 @@ Reads MIB definitions from @var{file}.
@deffn {Config} server id @{ ... @}
@smallexample
-server id @{
- enable bool;
- host string;
- version 1|2c|3;
+server @var{id} @{
+ enable @var{bool};
+ host @var{string};
+ version @samp{1}|@samp{2c}|@samp{3};
snmpv3 @{
- user string;
- auth-proto SHA|MD5;
- auth-passphrase string;
- priv-proto DES|AES;
- priv-passphrase string;
- context string;
- secure-engine-id <arg: string>;
- security-level noAuthNoPriv|authNoPriv|authPriv;
- engine-boots number;
- engine-time number;
+ user @var{string};
+ auth-proto @samp{SHA}|@samp{MD5};
+ auth-passphrase @var{string};
+ priv-proto @samp{DES}|@samp{AES};
+ priv-passphrase @var{string};
+ context @var{string};
+ secure-engine-id @var{string};
+ security-level @samp{noAuthNoPriv}|@samp{authNoPriv}|@samp{authPriv};
+ engine-boots @var{number};
+ engine-time @var{number};
@}
- timeout number;
- retries number;
- community string;
- expression expr;
- variable name oid;
- constant name value;
- macro name expansion;
- assert oid op pattern;
+ timeout @var{number};
+ retries @var{number};
+ community @var{string};
+ expression @var{expr};
+ table @var{name} @var{base-oid};
+ index @var{name} @var{value} @var{table}
+ variable @var{name} @var{oid};
+ constant @var{name} @var{value};
+ macro @var{name} @var{expansion};
+ assert @var{oid} @var{op} @var{pattern};
@}
@end smallexample
@@ -973,18 +975,72 @@ If this statement is absent, the default expression will be used
is reported.
@end deffn
+@deffn {Config: server} table name base-oid
+Define a slice in an SNMP table. The slice will be named @var{name}
+and will contain all MIBs under @var{base-oid}.
+
+The slice defined with this statement can be used in subsequent
+@var{index} statements to refer to a particular column in the table.
+
+For example, the following statement defines a slice of @samp{ifTable}
+(as defined in RFCs 1573 and 2863) which contains interface
+descriptions:
+
+@smallexample
+table iftable IF-MIB::ifDescr;
+@end smallexample
+@end deffn
+
+@deffn {Config: server} index name value table
+Define an @dfn{index} into a SNMP table @var{table}. The index
+@var{name} is defined as a number of row in @var{table} which has the
+value @var{value}. For example, if the table @samp{iftable} is
+defined as shown above, then the index of the row corresponding to
+interface @samp{eth1} can be defined as follows:
+
+@smallexample
+index x eth1 iftable;
+@end smallexample
+
+This index can subsequently be referred to in oids in @samp{variable}
+statements (see below) as @samp{$x}. For example, if the SNMP table
+@samp{iftable} contains:
+
+@smallexample
+IF-MIB::ifDescr.10: eth1
+@end smallexample
+
+@noindent
+then the value of @samp{$x} is @samp{10}.
+
+Note, that by @samp{number of row} we actually mean a sub-identifier
+(not necessarily a single number) that can be used to uniquely
+identify the row.
+@end deffn
+
@anchor{variable}
@deffn {Config: server} variable name oid [order]
Defines a variable @var{name} to have the value returned by
-@var{oid}. The latter must return a numeric value.
+@var{oid}. The oid can contain references to table indices defined by
+prior @samp{index} statements. For example (supposing that the @samp{index}
+and @samp{table} statements described above appear before this one):
+
+@smallexample
+variable out "IF-MIB::ifOutUcastPkts.$x";
+@end smallexample
+
+In this statement, the @samp{$x} part will be replaced by the index of
+the row, whose value matches that of index @samp{x}. It is an error
+if there is no such row.
-Any occurrence of @var{name} in the expression (as defined in the
-@samp{expression} statement) is replaced with this value.
+Once the variable is defined, any occurrence of @var{name} in the
+expression (as defined in the @samp{expression} statement) will be
+replaced with this value.
@cindex order
@kwindex increasing
@kwindex decreasing
-Optional @var{order} specifier may follow the @var{oid}. It describes
+An optional @var{order} specifier may follow the @var{oid}. It describes
the order in which this variable changes with time. The value
@samp{increasing} means that the values of this variable are described
by an increasing (more properly, non-decreasing) function. The value

Return to:

Send suggestions and report system problems to the System administrator.