From: Suzanne Goldlust Date: Mon, 31 Dec 2018 20:22:14 +0000 (-0500) Subject: Update hooks-stat-cmds.xml X-Git-Tag: 481-remote-subnet4-set-inconsistent-work-when-id-subnet-is-duplicated_base~54 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb7c59d7e85e0943f338400194953c4ce82f1f2a;p=thirdparty%2Fkea.git Update hooks-stat-cmds.xml --- diff --git a/doc/guide/hooks-stat-cmds.xml b/doc/guide/hooks-stat-cmds.xml index d4604c4737..18002dbccf 100644 --- a/doc/guide/hooks-stat-cmds.xml +++ b/doc/guide/hooks-stat-cmds.xml @@ -2,24 +2,23 @@ stat_cmds: Supplemental Statistics Commands This library provides additional statistics commands for - retrieving lease statistics from Kea DHCP servers. These commands + retrieving lease statistics from Kea DHCP servers. These commands were added to address an issue with obtaining accurate lease - statistics in deployments running multiple Kea servers that use - shared lease back end. The in-memory statistics kept by individual - servers only track lease changes made by that server. Thus in a + statistics in deployments running multiple Kea servers that use a + shared lease backend. The in-memory statistics kept by individual + servers only track lease changes made by that server; thus, in a deployment with multiple servers (e.g. two kea-dhcp6 servers using the same PostgreSQL database for lease storage), these statistics are incomplete. - In Kea 1.4, the MySQL and PostgreSQL back ends were modified to track + The MySQL and PostgreSQL backends were modified in Kea to track lease allocation changes as they occur via database triggers. Additionally, - all four lease back ends were extended to support retrieving lease + all four lease backends were extended to support retrieving lease statistics for all subnets, a single subnet, or a range of subnets. Finally, this library was constructed to provide commands for retrieving - these statistics. Additional statistics commands may be added to this - library in future releases. + these statistics. - This library may only be loaded by kea-dhcp4 - or kea-dhcp6 process. + This library may only be loaded by the kea-dhcp4 + or the kea-dhcp6 process. @@ -42,9 +41,9 @@ - All commands use JSON syntax and can be issued either directly to - the servers via the control channel (see ) - or via Control Agent (see ). + All commands use JSON syntax and can be issued directly to + the servers via either the control channel (see ) + or the Control Agent (see ). @@ -67,42 +66,42 @@ In a deployment with multiple Kea DHCP servers sharing a common lease - storage, it may be loaded by any or all of the servers. However, one + storage, it may be loaded by any or all of the servers. However, one thing to keep in mind is that a server's response to a stat-lease{4/6}-get - command will only contain data for subnets known to that server. In - other words, if subnet does not appear in a server's configuration, it + command will only contain data for subnets known to that server. In + other words, if a subnet does not appear in a server's configuration, Kea will not retrieve statistics for it.
- stat-lease4-get, stat-lease6-get commands + stat-lease4-get, stat-lease6-get Commands The stat-lease4-get and stat-lease6-get - commands fetch lease statistics for a range of known subnets. The + commands fetch lease statistics for a range of known subnets. The range of subnets is determined through the use of optional command input parameters: - subnet-id - ID of the subnet for which + subnet-id - The ID of the subnet for which lease statistics should be fetched. Use this to get statistics for - a single subnet. If the subnet does not exist the command result + a single subnet. If the subnet does not exist, the command result code will be 3 (i.e. CONTROL_RESULT_EMPTY). subnet-range - A pair of subnet IDs which describe an inclusive range of subnets for which statistics should - be retrieved. Note that fuzzy values are supported thus allowing + be retrieved. Note that fuzzy values are supported, thus allowing for a query for statistics using approximate ID values. If the range does not include any known subnets, the command result code will be 3 (i.e. CONTROL_RESULT_EMPTY). - first-subnet-id - ID of the first + first-subnet-id - The ID of the first subnet in the range. - last-subnet-id - ID of the first + last-subnet-id - The ID of the last subnet in the range. @@ -111,11 +110,11 @@ The use of subnet-id and subnet-range are mutually exclusive. If no parameters are given, the result will contain data for all - known subnets. Note that in configurations with large numbers of - subnets, this can be result in a large response. + known subnets. Note that in configurations with large numbers of + subnets, this can result in a large response. - The following command would fetch lease statistics for all known subnets from kea-dhcp4 server: + The following command would fetch lease statistics for all known subnets from a kea-dhcp4 server: { "command": "stat-lease4-get" @@ -123,7 +122,7 @@ - The following command would fetch lease statistcis for subnet ID 10 from kea-dhcp6 server: + The following command would fetch lease statistcis for subnet ID 10 from a kea-dhcp6 server: { "command": "stat-lease6-get", @@ -134,7 +133,7 @@ - The following command would fetch lease statistcis for all subnets from subnet ID 10 through 50 from kea-dhcp4 server: + The following command would fetch lease statistics for all subnets from subnet IDs 10 through 50 from a kea-dhcp4 server: { "command": "stat-lease4-get", @@ -149,16 +148,16 @@ - The response to the either command will contain three elements: + The response to either command will contain three elements: - result - numeric value indicating the outcome of the + result - a numeric value indicating the outcome of the command where: - 0 - command was successful + 0 - the command was successful; 1 - an error occurred, an explanation will - be the "text" element - 2 - indicates the fetch found no matching data + be the "text" element; + 2 - the fetch found no matching data @@ -168,12 +167,12 @@ arguments - a map containing the data returned by the - command as the element "result-set", which patterned after SQL statement responses: + command as the element "result-set", which is patterned after SQL statement responses: - columns - a list of text column labels. + columns - a list of text column labels The columns returned for DHCPv4 are: - subnet-id - ID of the subnet + subnet-id - ID of the subnet. total-addresses - total number of addresses available for DHCPv4 management in the subnet. In other words, this is the sum of all addresses in all the configured pools in the subnet. @@ -186,7 +185,7 @@ The columns returned for DHCPv6 are: - subnet-id - ID of the subnet + subnet-id - ID of the subnet. total-nas - number of NA addresses available for DHCPv6 management in the subnet. In other words, this is the sum of all the NA addresses in the all configured NA pools in the subnet. @@ -202,11 +201,11 @@ rows - a list of rows, one per subnet ID. Each row - contains a data value for corresponding to and in the same order as each column + contains a data value corresponding to and in the same order as each column listed in "columns" for a given subnet. timestamp - textual date and time the data was fetched, - expressed as GMT + expressed as GMT.