Kea
1.9.9-git
|
Implements the logic for processing commands pertaining to stat manipulation. More...
#include <stat_cmds.h>
Public Member Functions | |
StatCmds () | |
Default Constructor. More... | |
int | statLease4GetHandler (hooks::CalloutHandle &handle) |
stat-lease4-get command handler More... | |
int | statLease6GetHandler (hooks::CalloutHandle &handle) |
stat-lease6-get command handler More... | |
Implements the logic for processing commands pertaining to stat manipulation.
This class is used by the callouts implementing command handlers for stat manipulations.
Definition at line 25 of file stat_cmds.h.
|
inline |
Default Constructor.
Definition at line 28 of file stat_cmds.h.
int isc::stat_cmds::StatCmds::statLease4GetHandler | ( | hooks::CalloutHandle & | handle | ) |
stat-lease4-get command handler
This command attempts to fetch lease4 statistics for one or more subnets based upon subnet selection criteria (or lack thereof). It extracts the command name and arguments from the given Callouthandle, attempts to process them, and then set's the handle's "response" arguments accordingly. { "command": "stat-lease4-get", "arguments": { "subnet-id": 10 // optional "subnet-range": { // optional "first-subnet-id": 10, // id >= 10 "last-subnet-id": 50 // id <= 50 } } }
It produces a response as described below:
{ "result": 0, "text": "<message>", "arguments": { "result-set": { "timestamp": "2018-03-22 09:43:30.815371", "columns": ["subnet_id", "total-addresses", "cumulative-assigned-addresses", "assigned-addresses", "declined-addresses"], "rows": [ [1, 600, 1000, 450, 3], : ] } } }
handle | Callout context - which is expected to contain the |
add command JSON text in the "command" argument
Definition at line 678 of file stat_cmds.cc.
References isc::flex_option::impl, and isc::stat_cmds::LeaseStatCmdsImpl::statLease4GetHandler().
Referenced by stat_lease4_get().
int isc::stat_cmds::StatCmds::statLease6GetHandler | ( | hooks::CalloutHandle & | handle | ) |
stat-lease6-get command handler
This command attempts to fetch lease6 statistics for one or more subnets based upon subnet selection criteria (or lack thereof). It extracts the command name and arguments from the given Callouthandle, attempts to process them, and then set's the handle's "response" argument accordingly. { "command": "stat-lease6-get", "arguments": { "subnet-id": 10 // optional "subnet-range": { // optional "first-subnet-id": 10, // id >= 10 "last-subnet-id": 50 // id <= 50 } } }
It produces a response as described below:
{ "result": 0, "text": "<message>", "arguments": { "result-set": { "timestamp": "2018-03-22 09:43:30.815371", "columns": ["subnet_id", "total-nas", "cumulative-assigned-nas", "assigned-nas", "declined-nas", "total-pds", "cumulative-assigned-pds", "assigned-pds"], "rows": [ [1, 600, 1000, 450, 3, 64, 20, 10], : ] } } }
handle | Callout context - which is expected to contain the add command JSON text in the "command" argument |
Definition at line 685 of file stat_cmds.cc.
References isc::flex_option::impl, and isc::stat_cmds::LeaseStatCmdsImpl::statLease6GetHandler().
Referenced by stat_lease6_get().