src/share/api/shutdown.json
src/share/api/statistic-get.json
src/share/api/statistic-get-all.json
+src/share/api/statistic-global-get-all.json
src/share/api/statistic-remove.json
src/share/api/statistic-remove-all.json
src/share/api/statistic-reset.json
"result": 0
}
+.. isccmd:: statistic-global-get-all
+.. _command-statistic-global-get-all:
+
+The ``statistic-global-get-all`` Command
+----------------------------------------
+
+The :isccmd:`statistic-global-get-all` command retrieves all global statistics recorded
+(same as :isccmd:`statistic-global-get-all` but omitting subnet statistics). An example
+command may look like this:
+
+::
+
+ {
+ "command": "statistic-global-get-all",
+ "arguments": { }
+ }
+
+The server responds with details of all recorded statistics, with a
+result set to 0 to indicate that it iterated over all statistics (even
+when the total number of statistics is zero).
+
+Here is an example response returning all collected statistics:
+
+::
+
+ {
+ "command": "statistic-global-get-all",
+ "arguments": {
+ "assigned-addresses": [
+ [
+ 0,
+ "2023-06-13 20:42:46.836096"
+ ]
+ ],
+ "cumulative-assigned-addresses": [
+ [
+ 0,
+ "2023-06-13 20:42:46.836166"
+ ]
+ ],
+ "declined-addresses": [
+ [
+ 0,
+ "2023-06-13 20:42:46.836156"
+ ]
+ ],
+ "pkt4-ack-received": [
+ [
+ 0,
+ "2023-06-13 20:42:46.616247"
+ ]
+ ],
+ "pkt4-ack-sent": [
+ [
+ 0,
+ "2023-06-13 20:42:46.616290"
+ ]
+ ],
+ "pkt4-decline-received": [
+ [
+ 0,
+ "2023-06-13 20:42:46.616296"
+ ]
+ ],
+ "pkt4-discover-received": [
+ [
+ 0,
+ "2023-06-13 20:42:46.616303"
+ ]
+ ],
+ "pkt4-inform-received": [
+ [
+ 0,
+ "2023-06-13 20:42:46.616308"
+ ]
+ ],
+ "pkt4-nak-received": [
+ [
+ 0,
+ "2023-06-13 20:42:46.616312"
+ ]
+ ],
+ "pkt4-nak-sent": [
+ [
+ 0,
+ "2023-06-13 20:42:46.616314"
+ ]
+ ],
+ "pkt4-offer-received": [
+ [
+ 0,
+ "2023-06-13 20:42:46.616318"
+ ]
+ ],
+ "pkt4-offer-sent": [
+ [
+ 0,
+ "2023-06-13 20:42:46.616323"
+ ]
+ ],
+ "pkt4-parse-failed": [
+ [
+ 0,
+ "2023-06-13 20:42:46.616326"
+ ]
+ ],
+ "pkt4-receive-drop": [
+ [
+ 0,
+ "2023-06-13 20:42:46.616330"
+ ]
+ ],
+ "pkt4-received": [
+ [
+ 0,
+ "2023-06-13 20:42:46.616335"
+ ]
+ ],
+ "pkt4-release-received": [
+ [
+ 0,
+ "2023-06-13 20:42:46.616339"
+ ]
+ ],
+ "pkt4-request-received": [
+ [
+ 0,
+ "2023-06-13 20:42:46.616343"
+ ]
+ ],
+ "pkt4-sent": [
+ [
+ 0,
+ "2023-06-13 20:42:46.616348"
+ ]
+ ],
+ "pkt4-unknown-received": [
+ [
+ 0,
+ "2023-06-13 20:42:46.616354"
+ ]
+ ],
+ "reclaimed-declined-addresses": [
+ [
+ 0,
+ "2023-06-13 20:42:46.836159"
+ ]
+ ],
+ "reclaimed-leases": [
+ [
+ 0,
+ "2023-06-13 20:42:46.836163"
+ ]
+ ],
+ "v4-allocation-fail": [
+ [
+ 0,
+ "2023-06-13 20:42:46.616358"
+ ]
+ ],
+ "v4-allocation-fail-classes": [
+ [
+ 0,
+ "2023-06-13 20:42:46.616363"
+ ]
+ ],
+ "v4-allocation-fail-no-pools": [
+ [
+ 0,
+ "2023-06-13 20:42:46.616368"
+ ]
+ ],
+ "v4-allocation-fail-shared-network": [
+ [
+ 0,
+ "2023-06-13 20:42:46.616372"
+ ]
+ ],
+ "v4-allocation-fail-subnet": [
+ [
+ 0,
+ "2023-06-13 20:42:46.616376"
+ ]
+ ],
+ "v4-lease-reuses": [
+ [
+ 0,
+ "2023-06-13 20:42:46.616410"
+ ]
+ ],
+ "v4-reservation-conflicts": [
+ [
+ 0,
+ "2023-06-13 20:42:46.616412"
+ ]
+ ]
+ },
+ "result": 0
+ }
+
+or
+
+::
+
+ {
+ "command": "statistic-global-get-all",
+ "arguments": {
+ "assigned-nas": [
+ [
+ 0,
+ "2023-06-13 21:28:57.196757"
+ ]
+ ],
+ "assigned-pds": [
+ [
+ 0,
+ "2023-06-13 21:28:57.196757"
+ ]
+ ],
+ "cumulative-assigned-nas": [
+ [
+ 0,
+ "2023-06-13 21:28:57.196757"
+ ]
+ ],
+ "cumulative-assigned-pds": [
+ [
+ 0,
+ "2023-06-13 21:28:57.196758"
+ ]
+ ],
+ "cumulative-registered": [
+ [
+ 0,
+ "2023-06-13 21:28:57.196758"
+ ]
+ ],
+ "declined-addresses": [
+ [
+ 0,
+ "2023-06-13 21:28:57.196754"
+ ]
+ ],
+ "pkt6-addr-reg-inform-received": [
+ [
+ 0,
+ "2023-06-13 21:28:57.177731"
+ ]
+ ],
+ "pkt6-addr-reg-reply-received": [
+ [
+ 0,
+ "2023-06-13 21:28:57.177731"
+ ]
+ ],
+ "pkt6-addr-reg-reply-sent": [
+ [
+ 0,
+ "2023-06-13 21:28:57.177731"
+ ]
+ ],
+ "pkt6-advertise-received": [
+ [
+ 0,
+ "2023-06-13 21:28:57.177731"
+ ]
+ ],
+ "pkt6-advertise-sent": [
+ [
+ 0,
+ "2023-06-13 21:28:57.177739"
+ ]
+ ],
+ "pkt6-decline-received": [
+ [
+ 0,
+ "2023-06-13 21:28:57.177739"
+ ]
+ ],
+ "pkt6-dhcpv4-query-received": [
+ [
+ 0,
+ "2023-06-13 21:28:57.177740"
+ ]
+ ],
+ "pkt6-dhcpv4-response-received": [
+ [
+ 0,
+ "2023-06-13 21:28:57.177740"
+ ]
+ ],
+ "pkt6-dhcpv4-response-sent": [
+ [
+ 0,
+ "2023-06-13 21:28:57.177741"
+ ]
+ ],
+ "pkt6-infrequest-received": [
+ [
+ 0,
+ "2023-06-13 21:28:57.177742"
+ ]
+ ],
+ "pkt6-parse-failed": [
+ [
+ 0,
+ "2023-06-13 21:28:57.177742"
+ ]
+ ],
+ "pkt6-rebind-received": [
+ [
+ 0,
+ "2023-06-13 21:28:57.177743"
+ ]
+ ],
+ "pkt6-receive-drop": [
+ [
+ 0,
+ "2023-06-13 21:28:57.177743"
+ ]
+ ],
+ "pkt6-received": [
+ [
+ 0,
+ "2023-06-13 21:28:57.177744"
+ ]
+ ],
+ "pkt6-release-received": [
+ [
+ 0,
+ "2023-06-13 21:28:57.177744"
+ ]
+ ],
+ "pkt6-renew-received": [
+ [
+ 0,
+ "2023-06-13 21:28:57.177745"
+ ]
+ ],
+ "pkt6-reply-received": [
+ [
+ 0,
+ "2023-06-13 21:28:57.177745"
+ ]
+ ],
+ "pkt6-reply-sent": [
+ [
+ 0,
+ "2023-06-13 21:28:57.177746"
+ ]
+ ],
+ "pkt6-request-received": [
+ [
+ 0,
+ "2023-06-13 21:28:57.177747"
+ ]
+ ],
+ "pkt6-sent": [
+ [
+ 0,
+ "2023-06-13 21:28:57.177747"
+ ]
+ ],
+ "pkt6-solicit-received": [
+ [
+ 0,
+ "2023-06-13 21:28:57.177748"
+ ]
+ ],
+ "pkt6-unknown-received": [
+ [
+ 0,
+ "2023-06-13 21:28:57.177748"
+ ]
+ ],
+ "reclaimed-declined-addresses": [
+ [
+ 0,
+ "2023-06-13 21:28:57.196755"
+ ]
+ ],
+ "reclaimed-leases": [
+ [
+ 0,
+ "2023-06-13 21:28:57.196756"
+ ]
+ ],
+ "v6-allocation-fail": [
+ [
+ 0,
+ "2023-06-13 21:28:57.177749"
+ ]
+ ],
+ "v6-allocation-fail-classes": [
+ [
+ 0,
+ "2023-06-13 21:28:57.177755"
+ ]
+ ],
+ "v6-allocation-fail-no-pools": [
+ [
+ 0,
+ "2023-06-13 21:28:57.177756"
+ ]
+ ],
+ "v6-allocation-fail-shared-network": [
+ [
+ 0,
+ "2023-06-13 21:28:57.177756"
+ ]
+ ],
+ "v6-allocation-fail-subnet": [
+ [
+ 0,
+ "2023-06-13 21:28:57.177757"
+ ]
+ ],
+ "v6-ia-na-lease-reuses": [
+ [
+ 0,
+ "2023-06-13 21:28:57.177757"
+ ]
+ ],
+ "v6-ia-pd-lease-reuses": [
+ [
+ 0,
+ "2023-06-13 21:28:57.177758"
+ ]
+ ]
+ },
+ "result": 0
+ }
+
.. isccmd:: statistic-reset-all
.. _command-statistic-reset-all:
CommandMgr::instance().registerCommand("statistic-get-all",
std::bind(&StatsMgr::statisticGetAllHandler, ph::_1, ph::_2));
+ CommandMgr::instance().registerCommand("statistic-global-get-all",
+ std::bind(&StatsMgr::statisticGlobalGetAllHandler, ph::_1, ph::_2));
+
CommandMgr::instance().registerCommand("statistic-reset-all",
std::bind(&StatsMgr::statisticResetAllHandler, ph::_1, ph::_2));
CommandMgr::instance().deregisterCommand("shutdown");
CommandMgr::instance().deregisterCommand("statistic-get");
CommandMgr::instance().deregisterCommand("statistic-get-all");
+ CommandMgr::instance().deregisterCommand("statistic-global-get-all");
CommandMgr::instance().deregisterCommand("statistic-remove");
CommandMgr::instance().deregisterCommand("statistic-remove-all");
CommandMgr::instance().deregisterCommand("statistic-reset");
EXPECT_TRUE(command_list.find("\"shutdown\"") != string::npos);
EXPECT_TRUE(command_list.find("\"statistic-get\"") != string::npos);
EXPECT_TRUE(command_list.find("\"statistic-get-all\"") != string::npos);
+ EXPECT_TRUE(command_list.find("\"statistic-global-get-all\"") != string::npos);
EXPECT_TRUE(command_list.find("\"statistic-remove\"") != string::npos);
EXPECT_TRUE(command_list.find("\"statistic-remove-all\"") != string::npos);
EXPECT_TRUE(command_list.find("\"statistic-reset\"") != string::npos);
EXPECT_EQ(stats_get_all, response);
+ // Check statistic-global-get-all
+ sendUnixCommand("{ \"command\" : \"statistic-global-get-all\", "
+ " \"arguments\": {}}", response);
+
+ EXPECT_EQ(stats_get_all, response);
+
// Check statistic-reset
sendUnixCommand("{ \"command\" : \"statistic-reset\", "
" \"arguments\": {"
checkListCommands(rsp, "shutdown");
checkListCommands(rsp, "statistic-get");
checkListCommands(rsp, "statistic-get-all");
+ checkListCommands(rsp, "statistic-global-get-all");
checkListCommands(rsp, "statistic-remove");
checkListCommands(rsp, "statistic-remove-all");
checkListCommands(rsp, "statistic-reset");
EXPECT_EQ(stats_get_all, response);
+ // Check statistic-global-get-all
+ sendHttpCommand("{ \"command\" : \"statistic-global-get-all\", "
+ " \"arguments\": {}}", response);
+
+ EXPECT_EQ(stats_get_all, response);
+
// Check statistic-reset
sendHttpCommand("{ \"command\" : \"statistic-reset\", "
" \"arguments\": {"
checkListCommands(rsp, "shutdown");
checkListCommands(rsp, "statistic-get");
checkListCommands(rsp, "statistic-get-all");
+ checkListCommands(rsp, "statistic-global-get-all");
checkListCommands(rsp, "statistic-remove");
checkListCommands(rsp, "statistic-remove-all");
checkListCommands(rsp, "statistic-reset");
CommandMgr::instance().registerCommand("statistic-get-all",
std::bind(&StatsMgr::statisticGetAllHandler, ph::_1, ph::_2));
+ CommandMgr::instance().registerCommand("statistic-global-get-all",
+ std::bind(&StatsMgr::statisticGlobalGetAllHandler, ph::_1, ph::_2));
+
CommandMgr::instance().registerCommand("statistic-reset-all",
std::bind(&StatsMgr::statisticResetAllHandler, ph::_1, ph::_2));
CommandMgr::instance().deregisterCommand("shutdown");
CommandMgr::instance().deregisterCommand("statistic-get");
CommandMgr::instance().deregisterCommand("statistic-get-all");
+ CommandMgr::instance().deregisterCommand("statistic-global-get-all");
CommandMgr::instance().deregisterCommand("statistic-remove");
CommandMgr::instance().deregisterCommand("statistic-remove-all");
CommandMgr::instance().deregisterCommand("statistic-reset");
EXPECT_TRUE(command_list.find("\"shutdown\"") != string::npos);
EXPECT_TRUE(command_list.find("\"statistic-get\"") != string::npos);
EXPECT_TRUE(command_list.find("\"statistic-get-all\"") != string::npos);
+ EXPECT_TRUE(command_list.find("\"statistic-global-get-all\"") != string::npos);
EXPECT_TRUE(command_list.find("\"statistic-remove\"") != string::npos);
EXPECT_TRUE(command_list.find("\"statistic-remove-all\"") != string::npos);
EXPECT_TRUE(command_list.find("\"statistic-reset\"") != string::npos);
EXPECT_EQ(stats_get_all, response);
+ // Check statistic-global-get-all
+ sendUnixCommand("{ \"command\" : \"statistic-global-get-all\", "
+ " \"arguments\": {}}", response);
+
+ EXPECT_EQ(stats_get_all, response);
+
// Check statistic-reset
sendUnixCommand("{ \"command\" : \"statistic-reset\", "
" \"arguments\": {"
checkListCommands(rsp, "shutdown");
checkListCommands(rsp, "statistic-get");
checkListCommands(rsp, "statistic-get-all");
+ checkListCommands(rsp, "statistic-global-get-all");
checkListCommands(rsp, "statistic-remove");
checkListCommands(rsp, "statistic-remove-all");
checkListCommands(rsp, "statistic-reset");
EXPECT_EQ(stats_get_all, response);
+ // Check statistic-global-get-all
+ sendHttpCommand("{ \"command\" : \"statistic-global-get-all\", "
+ " \"arguments\": {}}", response);
+
+ EXPECT_EQ(stats_get_all, response);
+
// Check statistic-reset
sendHttpCommand("{ \"command\" : \"statistic-reset\", "
" \"arguments\": {"
checkListCommands(rsp, "shutdown");
checkListCommands(rsp, "statistic-get");
checkListCommands(rsp, "statistic-get-all");
+ checkListCommands(rsp, "statistic-global-get-all");
checkListCommands(rsp, "statistic-remove");
checkListCommands(rsp, "statistic-remove-all");
checkListCommands(rsp, "statistic-reset");
"Failed to run: HTTP Error 401: Unauthorized"
shell_command_test "shell.authorized" \
"--auth-user pet --auth-password meow" "list-commands" "" \
- "[ { \"arguments\": [ \"build-report\", \"config-backend-pull\", \"config-get\", \"config-hash-get\", \"config-reload\", \"config-set\", \"config-test\", \"config-write\", \"dhcp-disable\", \"dhcp-enable\", \"leases-reclaim\", \"list-commands\", \"server-tag-get\", \"shutdown\", \"statistic-get\", \"statistic-get-all\", \"statistic-remove\", \"statistic-remove-all\", \"statistic-reset\", \"statistic-reset-all\", \"statistic-sample-age-set\", \"statistic-sample-age-set-all\", \"statistic-sample-count-set\", \"statistic-sample-count-set-all\", \"status-get\", \"subnet4-select-test\", \"subnet4o6-select-test\", \"version-get\" ], \"result\": 0 } ]"
+ "[ { \"arguments\": [ \"build-report\", \"config-backend-pull\", \"config-get\", \"config-hash-get\", \"config-reload\", \"config-set\", \"config-test\", \"config-write\", \"dhcp-disable\", \"dhcp-enable\", \"leases-reclaim\", \"list-commands\", \"server-tag-get\", \"shutdown\", \"statistic-get\", \"statistic-get-all\", \"statistic-global-get-all\", \"statistic-remove\", \"statistic-remove-all\", \"statistic-reset\", \"statistic-reset-all\", \"statistic-sample-age-set\", \"statistic-sample-age-set-all\", \"statistic-sample-count-set\", \"statistic-sample-count-set-all\", \"status-get\", \"subnet4-select-test\", \"subnet4o6-select-test\", \"version-get\" ], \"result\": 0 } ]"
shell_command_test "shell.bad-auth-password-file" \
"--auth-user foo --auth-password-file foobar" "list-commands" "fail" \
"Failed to run: [Errno 2] No such file or directory: 'foobar'"
"Failed to run: HTTP Error 401: Unauthorized"
shell_command_test "shell.good-auth-password-file-content" \
"--auth-user pet --auth-password-file ${tmpfile_path}/auth_password_file" "list-commands" "" \
- "[ { \"arguments\": [ \"build-report\", \"config-backend-pull\", \"config-get\", \"config-hash-get\", \"config-reload\", \"config-set\", \"config-test\", \"config-write\", \"dhcp-disable\", \"dhcp-enable\", \"leases-reclaim\", \"list-commands\", \"server-tag-get\", \"shutdown\", \"statistic-get\", \"statistic-get-all\", \"statistic-remove\", \"statistic-remove-all\", \"statistic-reset\", \"statistic-reset-all\", \"statistic-sample-age-set\", \"statistic-sample-age-set-all\", \"statistic-sample-count-set\", \"statistic-sample-count-set-all\", \"status-get\", \"subnet4-select-test\", \"subnet4o6-select-test\", \"version-get\" ], \"result\": 0 } ]"
+ "[ { \"arguments\": [ \"build-report\", \"config-backend-pull\", \"config-get\", \"config-hash-get\", \"config-reload\", \"config-set\", \"config-test\", \"config-write\", \"dhcp-disable\", \"dhcp-enable\", \"leases-reclaim\", \"list-commands\", \"server-tag-get\", \"shutdown\", \"statistic-get\", \"statistic-get-all\", \"statistic-global-get-all\", \"statistic-remove\", \"statistic-remove-all\", \"statistic-reset\", \"statistic-reset-all\", \"statistic-sample-age-set\", \"statistic-sample-age-set-all\", \"statistic-sample-count-set\", \"statistic-sample-count-set-all\", \"status-get\", \"subnet4-select-test\", \"subnet4o6-select-test\", \"version-get\" ], \"result\": 0 } ]"
shell_command_test "shell.flag-precedence" \
"--auth-user pet --auth-password meow --auth-password-file ${tmpfile_path}/auth_bad_password_file" "list-commands" "fail" \
"Failed to run: HTTP Error 401: Unauthorized"
"Failed to run: HTTP Error 401: Unauthorized"
shell_command_test "shell.authorized" \
"--auth-user pet --auth-password meow" "list-commands" "" \
- "[ { \"arguments\": [ \"build-report\", \"config-backend-pull\", \"config-get\", \"config-hash-get\", \"config-reload\", \"config-set\", \"config-test\", \"config-write\", \"dhcp-disable\", \"dhcp-enable\", \"leases-reclaim\", \"list-commands\", \"server-tag-get\", \"shutdown\", \"statistic-get\", \"statistic-get-all\", \"statistic-remove\", \"statistic-remove-all\", \"statistic-reset\", \"statistic-reset-all\", \"statistic-sample-age-set\", \"statistic-sample-age-set-all\", \"statistic-sample-count-set\", \"statistic-sample-count-set-all\", \"status-get\", \"subnet6-select-test\", \"version-get\" ], \"result\": 0 } ]"
+ "[ { \"arguments\": [ \"build-report\", \"config-backend-pull\", \"config-get\", \"config-hash-get\", \"config-reload\", \"config-set\", \"config-test\", \"config-write\", \"dhcp-disable\", \"dhcp-enable\", \"leases-reclaim\", \"list-commands\", \"server-tag-get\", \"shutdown\", \"statistic-get\", \"statistic-get-all\", \"statistic-global-get-all\", \"statistic-remove\", \"statistic-remove-all\", \"statistic-reset\", \"statistic-reset-all\", \"statistic-sample-age-set\", \"statistic-sample-age-set-all\", \"statistic-sample-count-set\", \"statistic-sample-count-set-all\", \"status-get\", \"subnet6-select-test\", \"version-get\" ], \"result\": 0 } ]"
shell_command_test "shell.bad-auth-password-file" \
"--auth-user foo --auth-password-file foobar" "list-commands" "fail" \
"Failed to run: [Errno 2] No such file or directory: 'foobar'"
"Failed to run: HTTP Error 401: Unauthorized"
shell_command_test "shell.good-auth-password-file-content" \
"--auth-user pet --auth-password-file ${tmpfile_path}/auth_password_file" "list-commands" "" \
- "[ { \"arguments\": [ \"build-report\", \"config-backend-pull\", \"config-get\", \"config-hash-get\", \"config-reload\", \"config-set\", \"config-test\", \"config-write\", \"dhcp-disable\", \"dhcp-enable\", \"leases-reclaim\", \"list-commands\", \"server-tag-get\", \"shutdown\", \"statistic-get\", \"statistic-get-all\", \"statistic-remove\", \"statistic-remove-all\", \"statistic-reset\", \"statistic-reset-all\", \"statistic-sample-age-set\", \"statistic-sample-age-set-all\", \"statistic-sample-count-set\", \"statistic-sample-count-set-all\", \"status-get\", \"subnet6-select-test\", \"version-get\" ], \"result\": 0 } ]"
+ "[ { \"arguments\": [ \"build-report\", \"config-backend-pull\", \"config-get\", \"config-hash-get\", \"config-reload\", \"config-set\", \"config-test\", \"config-write\", \"dhcp-disable\", \"dhcp-enable\", \"leases-reclaim\", \"list-commands\", \"server-tag-get\", \"shutdown\", \"statistic-get\", \"statistic-get-all\", \"statistic-global-get-all\", \"statistic-remove\", \"statistic-remove-all\", \"statistic-reset\", \"statistic-reset-all\", \"statistic-sample-age-set\", \"statistic-sample-age-set-all\", \"statistic-sample-count-set\", \"statistic-sample-count-set-all\", \"status-get\", \"subnet6-select-test\", \"version-get\" ], \"result\": 0 } ]"
shell_command_test "shell.flag-precedence" \
"--auth-user pet --auth-password meow --auth-password-file ${tmpfile_path}/auth_bad_password_file" "list-commands" "fail" \
"Failed to run: HTTP Error 401: Unauthorized"
version_test "shell.version"
shell_command_test "shell.list-commands" "list-commands" \
- "[ { \"arguments\": [ \"build-report\", \"config-backend-pull\", \"config-get\", \"config-hash-get\", \"config-reload\", \"config-set\", \"config-test\", \"config-write\", \"dhcp-disable\", \"dhcp-enable\", \"leases-reclaim\", \"list-commands\", \"server-tag-get\", \"shutdown\", \"statistic-get\", \"statistic-get-all\", \"statistic-remove\", \"statistic-remove-all\", \"statistic-reset\", \"statistic-reset-all\", \"statistic-sample-age-set\", \"statistic-sample-age-set-all\", \"statistic-sample-count-set\", \"statistic-sample-count-set-all\", \"status-get\", \"subnet4-select-test\", \"subnet4o6-select-test\", \"version-get\" ], \"result\": 0 } ]" ""
+ "[ { \"arguments\": [ \"build-report\", \"config-backend-pull\", \"config-get\", \"config-hash-get\", \"config-reload\", \"config-set\", \"config-test\", \"config-write\", \"dhcp-disable\", \"dhcp-enable\", \"leases-reclaim\", \"list-commands\", \"server-tag-get\", \"shutdown\", \"statistic-get\", \"statistic-get-all\", \"statistic-global-get-all\", \"statistic-remove\", \"statistic-remove-all\", \"statistic-reset\", \"statistic-reset-all\", \"statistic-sample-age-set\", \"statistic-sample-age-set-all\", \"statistic-sample-count-set\", \"statistic-sample-count-set-all\", \"status-get\", \"subnet4-select-test\", \"subnet4o6-select-test\", \"version-get\" ], \"result\": 0 } ]" ""
shell_command_test "shell.bogus" "give-me-a-beer" \
"[ { \"result\": 2, \"text\": \"'give-me-a-beer' command not supported.\" } ]" ""
shell_command_test "shell.empty-config-test" "config-test" \
version_test "shell.version"
shell_command_test "shell.list-commands" "list-commands" \
- "[ { \"arguments\": [ \"build-report\", \"config-backend-pull\", \"config-get\", \"config-hash-get\", \"config-reload\", \"config-set\", \"config-test\", \"config-write\", \"dhcp-disable\", \"dhcp-enable\", \"leases-reclaim\", \"list-commands\", \"server-tag-get\", \"shutdown\", \"statistic-get\", \"statistic-get-all\", \"statistic-remove\", \"statistic-remove-all\", \"statistic-reset\", \"statistic-reset-all\", \"statistic-sample-age-set\", \"statistic-sample-age-set-all\", \"statistic-sample-count-set\", \"statistic-sample-count-set-all\", \"status-get\", \"subnet6-select-test\", \"version-get\" ], \"result\": 0 } ]" ""
+ "[ { \"arguments\": [ \"build-report\", \"config-backend-pull\", \"config-get\", \"config-hash-get\", \"config-reload\", \"config-set\", \"config-test\", \"config-write\", \"dhcp-disable\", \"dhcp-enable\", \"leases-reclaim\", \"list-commands\", \"server-tag-get\", \"shutdown\", \"statistic-get\", \"statistic-get-all\", \"statistic-global-get-all\", \"statistic-remove\", \"statistic-remove-all\", \"statistic-reset\", \"statistic-reset-all\", \"statistic-sample-age-set\", \"statistic-sample-age-set-all\", \"statistic-sample-count-set\", \"statistic-sample-count-set-all\", \"status-get\", \"subnet6-select-test\", \"version-get\" ], \"result\": 0 } ]" ""
shell_command_test "shell.bogus" "give-me-a-beer" \
"[ { \"result\": 2, \"text\": \"'give-me-a-beer' command not supported.\" } ]" ""
shell_command_test "shell.empty-config-test" "config-test" \
}
list_commands_test "NoTLS" "${CONFIG_NONE}" "" \
-"[ { \"arguments\": [ \"build-report\", \"config-backend-pull\", \"config-get\", \"config-hash-get\", \"config-reload\", \"config-set\", \"config-test\", \"config-write\", \"dhcp-disable\", \"dhcp-enable\", \"leases-reclaim\", \"list-commands\", \"server-tag-get\", \"shutdown\", \"statistic-get\", \"statistic-get-all\", \"statistic-remove\", \"statistic-remove-all\", \"statistic-reset\", \"statistic-reset-all\", \"statistic-sample-age-set\", \"statistic-sample-age-set-all\", \"statistic-sample-count-set\", \"statistic-sample-count-set-all\", \"status-get\", \"subnet4-select-test\", \"subnet4o6-select-test\", \"version-get\" ], \"result\": 0 } ]"
+"[ { \"arguments\": [ \"build-report\", \"config-backend-pull\", \"config-get\", \"config-hash-get\", \"config-reload\", \"config-set\", \"config-test\", \"config-write\", \"dhcp-disable\", \"dhcp-enable\", \"leases-reclaim\", \"list-commands\", \"server-tag-get\", \"shutdown\", \"statistic-get\", \"statistic-get-all\", \"statistic-global-get-all\", \"statistic-remove\", \"statistic-remove-all\", \"statistic-reset\", \"statistic-reset-all\", \"statistic-sample-age-set\", \"statistic-sample-age-set-all\", \"statistic-sample-count-set\", \"statistic-sample-count-set-all\", \"status-get\", \"subnet4-select-test\", \"subnet4o6-select-test\", \"version-get\" ], \"result\": 0 } ]"
list_commands_test "Encrypted" "${CONFIG_NOCR}" \
"--ca ${TEST_CA_DIR}/kea-ca.crt" \
-"[ { \"arguments\": [ \"build-report\", \"config-backend-pull\", \"config-get\", \"config-hash-get\", \"config-reload\", \"config-set\", \"config-test\", \"config-write\", \"dhcp-disable\", \"dhcp-enable\", \"leases-reclaim\", \"list-commands\", \"server-tag-get\", \"shutdown\", \"statistic-get\", \"statistic-get-all\", \"statistic-remove\", \"statistic-remove-all\", \"statistic-reset\", \"statistic-reset-all\", \"statistic-sample-age-set\", \"statistic-sample-age-set-all\", \"statistic-sample-count-set\", \"statistic-sample-count-set-all\", \"status-get\", \"subnet4-select-test\", \"subnet4o6-select-test\", \"version-get\" ], \"result\": 0 } ]"
+"[ { \"arguments\": [ \"build-report\", \"config-backend-pull\", \"config-get\", \"config-hash-get\", \"config-reload\", \"config-set\", \"config-test\", \"config-write\", \"dhcp-disable\", \"dhcp-enable\", \"leases-reclaim\", \"list-commands\", \"server-tag-get\", \"shutdown\", \"statistic-get\", \"statistic-get-all\", \"statistic-global-get-all\", \"statistic-remove\", \"statistic-remove-all\", \"statistic-reset\", \"statistic-reset-all\", \"statistic-sample-age-set\", \"statistic-sample-age-set-all\", \"statistic-sample-count-set\", \"statistic-sample-count-set-all\", \"status-get\", \"subnet4-select-test\", \"subnet4o6-select-test\", \"version-get\" ], \"result\": 0 } ]"
list_commands_test "Authenticated" "${CONFIG}" \
"--ca ${TEST_CA_DIR}/kea-ca.crt --cert ${TEST_CA_DIR}/kea-client.crt --key ${TEST_CA_DIR}/kea-client.key" \
-"[ { \"arguments\": [ \"build-report\", \"config-backend-pull\", \"config-get\", \"config-hash-get\", \"config-reload\", \"config-set\", \"config-test\", \"config-write\", \"dhcp-disable\", \"dhcp-enable\", \"leases-reclaim\", \"list-commands\", \"server-tag-get\", \"shutdown\", \"statistic-get\", \"statistic-get-all\", \"statistic-remove\", \"statistic-remove-all\", \"statistic-reset\", \"statistic-reset-all\", \"statistic-sample-age-set\", \"statistic-sample-age-set-all\", \"statistic-sample-count-set\", \"statistic-sample-count-set-all\", \"status-get\", \"subnet4-select-test\", \"subnet4o6-select-test\", \"version-get\" ], \"result\": 0 } ]"
+"[ { \"arguments\": [ \"build-report\", \"config-backend-pull\", \"config-get\", \"config-hash-get\", \"config-reload\", \"config-set\", \"config-test\", \"config-write\", \"dhcp-disable\", \"dhcp-enable\", \"leases-reclaim\", \"list-commands\", \"server-tag-get\", \"shutdown\", \"statistic-get\", \"statistic-get-all\", \"statistic-global-get-all\", \"statistic-remove\", \"statistic-remove-all\", \"statistic-reset\", \"statistic-reset-all\", \"statistic-sample-age-set\", \"statistic-sample-age-set-all\", \"statistic-sample-count-set\", \"statistic-sample-count-set-all\", \"status-get\", \"subnet4-select-test\", \"subnet4o6-select-test\", \"version-get\" ], \"result\": 0 } ]"
}
list_commands_test "NoTLS" "${CONFIG_NONE}" "" \
-"[ { \"arguments\": [ \"build-report\", \"config-backend-pull\", \"config-get\", \"config-hash-get\", \"config-reload\", \"config-set\", \"config-test\", \"config-write\", \"dhcp-disable\", \"dhcp-enable\", \"leases-reclaim\", \"list-commands\", \"server-tag-get\", \"shutdown\", \"statistic-get\", \"statistic-get-all\", \"statistic-remove\", \"statistic-remove-all\", \"statistic-reset\", \"statistic-reset-all\", \"statistic-sample-age-set\", \"statistic-sample-age-set-all\", \"statistic-sample-count-set\", \"statistic-sample-count-set-all\", \"status-get\", \"subnet6-select-test\", \"version-get\" ], \"result\": 0 } ]"
+"[ { \"arguments\": [ \"build-report\", \"config-backend-pull\", \"config-get\", \"config-hash-get\", \"config-reload\", \"config-set\", \"config-test\", \"config-write\", \"dhcp-disable\", \"dhcp-enable\", \"leases-reclaim\", \"list-commands\", \"server-tag-get\", \"shutdown\", \"statistic-get\", \"statistic-get-all\", \"statistic-global-get-all\", \"statistic-remove\", \"statistic-remove-all\", \"statistic-reset\", \"statistic-reset-all\", \"statistic-sample-age-set\", \"statistic-sample-age-set-all\", \"statistic-sample-count-set\", \"statistic-sample-count-set-all\", \"status-get\", \"subnet6-select-test\", \"version-get\" ], \"result\": 0 } ]"
list_commands_test "Encrypted" "${CONFIG_NOCR}" \
"--ca ${TEST_CA_DIR}/kea-ca.crt" \
-"[ { \"arguments\": [ \"build-report\", \"config-backend-pull\", \"config-get\", \"config-hash-get\", \"config-reload\", \"config-set\", \"config-test\", \"config-write\", \"dhcp-disable\", \"dhcp-enable\", \"leases-reclaim\", \"list-commands\", \"server-tag-get\", \"shutdown\", \"statistic-get\", \"statistic-get-all\", \"statistic-remove\", \"statistic-remove-all\", \"statistic-reset\", \"statistic-reset-all\", \"statistic-sample-age-set\", \"statistic-sample-age-set-all\", \"statistic-sample-count-set\", \"statistic-sample-count-set-all\", \"status-get\", \"subnet6-select-test\", \"version-get\" ], \"result\": 0 } ]"
+"[ { \"arguments\": [ \"build-report\", \"config-backend-pull\", \"config-get\", \"config-hash-get\", \"config-reload\", \"config-set\", \"config-test\", \"config-write\", \"dhcp-disable\", \"dhcp-enable\", \"leases-reclaim\", \"list-commands\", \"server-tag-get\", \"shutdown\", \"statistic-get\", \"statistic-get-all\", \"statistic-global-get-all\", \"statistic-remove\", \"statistic-remove-all\", \"statistic-reset\", \"statistic-reset-all\", \"statistic-sample-age-set\", \"statistic-sample-age-set-all\", \"statistic-sample-count-set\", \"statistic-sample-count-set-all\", \"status-get\", \"subnet6-select-test\", \"version-get\" ], \"result\": 0 } ]"
list_commands_test "Authenticated" "${CONFIG}" \
"--ca ${TEST_CA_DIR}/kea-ca.crt --cert ${TEST_CA_DIR}/kea-client.crt --key ${TEST_CA_DIR}/kea-client.key" \
-"[ { \"arguments\": [ \"build-report\", \"config-backend-pull\", \"config-get\", \"config-hash-get\", \"config-reload\", \"config-set\", \"config-test\", \"config-write\", \"dhcp-disable\", \"dhcp-enable\", \"leases-reclaim\", \"list-commands\", \"server-tag-get\", \"shutdown\", \"statistic-get\", \"statistic-get-all\", \"statistic-remove\", \"statistic-remove-all\", \"statistic-reset\", \"statistic-reset-all\", \"statistic-sample-age-set\", \"statistic-sample-age-set-all\", \"statistic-sample-count-set\", \"statistic-sample-count-set-all\", \"status-get\", \"subnet6-select-test\", \"version-get\" ], \"result\": 0 } ]"
+"[ { \"arguments\": [ \"build-report\", \"config-backend-pull\", \"config-get\", \"config-hash-get\", \"config-reload\", \"config-set\", \"config-test\", \"config-write\", \"dhcp-disable\", \"dhcp-enable\", \"leases-reclaim\", \"list-commands\", \"server-tag-get\", \"shutdown\", \"statistic-get\", \"statistic-get-all\", \"statistic-global-get-all\", \"statistic-remove\", \"statistic-remove-all\", \"statistic-reset\", \"statistic-reset-all\", \"statistic-sample-age-set\", \"statistic-sample-age-set-all\", \"statistic-sample-count-set\", \"statistic-sample-count-set-all\", \"status-get\", \"subnet6-select-test\", \"version-get\" ], \"result\": 0 } ]"
return (map);
}
+ConstElementPtr
+StatContext::getAllGlobal() const {
+ ElementPtr map = Element::createMap(); // a map
+ // Let's iterate over all stored statistics...
+ for (auto const& s : stats_) {
+ // ... and add each of them to the map omitting
+ // subnet statistics.
+ if (s.first.find("subnet") != 0) {
+ map->set(s.first, s.second->getJSON());
+ }
+ }
+ return (map);
+}
+
void
StatContext::setMaxSampleCountAll(uint32_t max_samples) {
// Let's iterate over all stored statistics...
/// @return map with all observations
isc::data::ConstElementPtr getAll() const;
+ /// @brief Returns a map with all observations omitting those
+ /// related to subnet statistics.
+ ///
+ /// @return map with all observations
+ isc::data::ConstElementPtr getAllGlobal() const;
+
private:
/// @brief Statistics container
return (getAllInternal());
}
+ConstElementPtr
+StatsMgr::getAllGlobal() const {
+ MultiThreadingLock lock(*mutex_);
+ return (getAllGlobalInternal());
+}
+
ConstElementPtr
StatsMgr::getAllInternal() const {
return (global_->getAll());
}
+ConstElementPtr
+StatsMgr::getAllGlobalInternal() const {
+ return (global_->getAllGlobal());
+}
+
void
StatsMgr::resetAll() {
MultiThreadingLock lock(*mutex_);
return (createAnswer(CONTROL_RESULT_SUCCESS, all_stats));
}
+ConstElementPtr
+StatsMgr::statisticGlobalGetAllHandler(const string& /*name*/,
+ const ConstElementPtr& /*params*/) {
+ ConstElementPtr all_stats = StatsMgr::instance().getAllGlobal();
+ return (createAnswer(CONTROL_RESULT_SUCCESS, all_stats));
+}
+
ConstElementPtr
StatsMgr::statisticResetAllHandler(const string& /*name*/,
const ConstElementPtr& /*params*/) {
/// @return JSON structures representing all statistics
isc::data::ConstElementPtr getAll() const;
+ /// @brief Returns all global statistics (omitting subnet statistics) as a JSON structure.
+ ///
+ /// @return JSON structures representing all global statistics (omitting subnet statistics)
+ isc::data::ConstElementPtr getAllGlobal() const;
+
/// @}
/// @brief Returns an observation.
///
/// @param name name of the command (ignored, should be "statistic-get-all")
/// @param params ignored
- /// @return answer containing values of all statistic
+ /// @return answer containing values of all statistics
static isc::data::ConstElementPtr
statisticGetAllHandler(const std::string& name,
const isc::data::ConstElementPtr& params);
+ /// @brief Handles statistic-global-get-all command
+ ///
+ /// This method handles statistic-global-get-all command, which returns values
+ /// of all global statistics (omitting subnet statistics). Params parameter is ignored.
+ ///
+ /// @param name name of the command (ignored, should be "statistic-global-get-all")
+ /// @param params ignored
+ /// @return answer containing values of all global statistics (omitting subnet statistics)
+ static isc::data::ConstElementPtr
+ statisticGlobalGetAllHandler(const std::string& name,
+ const isc::data::ConstElementPtr& params);
+
/// @brief Handles statistic-reset-all command
///
/// This method handles statistic-reset-all command, which sets values of
/// @return JSON structures representing all statistics
isc::data::ConstElementPtr getAllInternal() const;
+ /// @brief Returns all global statistics (omitting subnet statistics) as a JSON structure.
+ ///
+ /// Should be called in a thread safe context.
+ ///
+ /// @return JSON structures representing all global statistics (omitting subnet statistics)
+ isc::data::ConstElementPtr getAllGlobalInternal() const;
+
/// @private
/// @brief Utility method that attempts to extract statistic name
StatsMgr::instance().setValue("beta", 12.34);
StatsMgr::instance().setValue("gamma", dur1234);
StatsMgr::instance().setValue("delta", "Lorem ipsum");
+ StatsMgr::instance().setValue("subnet", static_cast<int64_t>(5678));
// Now get them. They're used to generate expected output
ConstElementPtr rep_alpha = StatsMgr::instance().get("alpha");
ConstElementPtr rep_beta = StatsMgr::instance().get("beta");
ConstElementPtr rep_gamma = StatsMgr::instance().get("gamma");
ConstElementPtr rep_delta = StatsMgr::instance().get("delta");
+ ConstElementPtr rep_subnet = StatsMgr::instance().get("subnet");
ASSERT_TRUE(rep_alpha);
ASSERT_TRUE(rep_beta);
ASSERT_TRUE(rep_gamma);
ASSERT_TRUE(rep_delta);
+ ASSERT_TRUE(rep_subnet);
std::string exp_str_alpha = "[ [ 1234, \"" +
isc::util::clockToText(StatsMgr::instance().getObservation("alpha")
std::string exp_str_delta = "[ [ \"Lorem ipsum\", \"" +
isc::util::clockToText(StatsMgr::instance().getObservation("delta")
->getString().second) + "\" ] ]";
+ std::string exp_str_subnet = "[ [ 5678, \"" +
+ isc::util::clockToText(StatsMgr::instance().getObservation("subnet")
+ ->getInteger().second) + "\" ] ]";
// Check that all of them can be reported at once
ConstElementPtr rsp = StatsMgr::instance().statisticGetAllHandler(
ASSERT_EQ(0, status_code);
ASSERT_TRUE(rep_all);
+ // Verifying this is a bit more involved, as we don't know whether the
+ // order would be preserved or not.
+ EXPECT_EQ(5, rep_all->size());
+ ASSERT_TRUE(rep_all->get("alpha"));
+ ASSERT_TRUE(rep_all->get("beta"));
+ ASSERT_TRUE(rep_all->get("delta"));
+ ASSERT_TRUE(rep_all->get("gamma"));
+ ASSERT_TRUE(rep_all->get("subnet"));
+ EXPECT_FALSE(rep_all->get("epsilon"));
+
+ EXPECT_EQ(exp_str_alpha, rep_all->get("alpha")->str());
+ EXPECT_EQ(exp_str_beta, rep_all->get("beta")->str());
+ EXPECT_EQ(exp_str_gamma, rep_all->get("gamma")->str());
+ EXPECT_EQ(exp_str_delta, rep_all->get("delta")->str());
+ EXPECT_EQ(exp_str_subnet, rep_all->get("subnet")->str());
+}
+
+// This test checks whether statistic-global-get-all command returns all statistics
+// correctly.
+TEST_F(StatsMgrTest, commandGlobalGetAll) {
+ // Set a couple of statistics
+ StatsMgr::instance().setValue("alpha", static_cast<int64_t>(1234));
+ StatsMgr::instance().setValue("beta", 12.34);
+ StatsMgr::instance().setValue("gamma", dur1234);
+ StatsMgr::instance().setValue("delta", "Lorem ipsum");
+ StatsMgr::instance().setValue("subnet", static_cast<int64_t>(5678));
+
+ // Now get them. They're used to generate expected output
+ ConstElementPtr rep_alpha = StatsMgr::instance().get("alpha");
+ ConstElementPtr rep_beta = StatsMgr::instance().get("beta");
+ ConstElementPtr rep_gamma = StatsMgr::instance().get("gamma");
+ ConstElementPtr rep_delta = StatsMgr::instance().get("delta");
+ ConstElementPtr rep_subnet = StatsMgr::instance().get("subnet");
+
+ ASSERT_TRUE(rep_alpha);
+ ASSERT_TRUE(rep_beta);
+ ASSERT_TRUE(rep_gamma);
+ ASSERT_TRUE(rep_delta);
+ ASSERT_TRUE(rep_subnet);
+
+ std::string exp_str_alpha = "[ [ 1234, \"" +
+ isc::util::clockToText(StatsMgr::instance().getObservation("alpha")
+ ->getInteger().second) + "\" ] ]";
+ std::string exp_str_beta = "[ [ 12.34, \"" +
+ isc::util::clockToText(StatsMgr::instance().getObservation("beta")
+ ->getFloat().second) + "\" ] ]";
+ std::string exp_str_gamma = "[ [ \"01:02:03.004000\", \"" +
+ isc::util::clockToText(StatsMgr::instance().getObservation("gamma")
+ ->getDuration().second) + "\" ] ]";
+ std::string exp_str_delta = "[ [ \"Lorem ipsum\", \"" +
+ isc::util::clockToText(StatsMgr::instance().getObservation("delta")
+ ->getString().second) + "\" ] ]";
+
+ // Check that all of them can be reported at once
+ ConstElementPtr rsp = StatsMgr::instance().statisticGlobalGetAllHandler(
+ "statistic-global-get-all", ElementPtr());
+ ASSERT_TRUE(rsp);
+ int status_code;
+ ConstElementPtr rep_all = parseAnswer(status_code, rsp);
+ ASSERT_EQ(0, status_code);
+ ASSERT_TRUE(rep_all);
+
// Verifying this is a bit more involved, as we don't know whether the
// order would be preserved or not.
EXPECT_EQ(4, rep_all->size());
ASSERT_TRUE(rep_all->get("beta"));
ASSERT_TRUE(rep_all->get("delta"));
ASSERT_TRUE(rep_all->get("gamma"));
+ ASSERT_FALSE(rep_all->get("subnet"));
EXPECT_FALSE(rep_all->get("epsilon"));
EXPECT_EQ(exp_str_alpha, rep_all->get("alpha")->str());
--- /dev/null
+{
+ "access": "read",
+ "avail": "3.1.2",
+ "brief": [
+ "This command retrieves all recorded global statistics (omitting subnet statistics)."
+ ],
+ "cmd-comment": [
+ "The server responds with the details of all recorded global statistics (omitting subnet statistics), with a result of 0 indicating that it iterated over all global statistics (even when the total number of global statistics is zero)."
+ ],
+ "cmd-syntax": [
+ "{",
+ " \"command\": \"statistic-global-get-all\",",
+ " \"arguments\": { }",
+ "}"
+ ],
+ "resp-syntax": [
+ "{",
+ " \"result\": 0,",
+ " \"arguments\": {",
+ " \"assigned-addresses\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 20:42:46.836096\"",
+ " ]",
+ " ],",
+ " \"cumulative-assigned-addresses\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 20:42:46.836166\"",
+ " ]",
+ " ],",
+ " \"declined-addresses\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 20:42:46.836156\"",
+ " ]",
+ " ],",
+ " \"pkt4-ack-received\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 20:42:46.616247\"",
+ " ]",
+ " ],",
+ " \"pkt4-ack-sent\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 20:42:46.616290\"",
+ " ]",
+ " ],",
+ " \"pkt4-decline-received\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 20:42:46.616296\"",
+ " ]",
+ " ],",
+ " \"pkt4-discover-received\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 20:42:46.616303\"",
+ " ]",
+ " ],",
+ " \"pkt4-inform-received\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 20:42:46.616308\"",
+ " ]",
+ " ],",
+ " \"pkt4-nak-received\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 20:42:46.616312\"",
+ " ]",
+ " ],",
+ " \"pkt4-nak-sent\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 20:42:46.616314\"",
+ " ]",
+ " ],",
+ " \"pkt4-offer-received\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 20:42:46.616318\"",
+ " ]",
+ " ],",
+ " \"pkt4-offer-sent\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 20:42:46.616323\"",
+ " ]",
+ " ],",
+ " \"pkt4-parse-failed\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 20:42:46.616326\"",
+ " ]",
+ " ],",
+ " \"pkt4-receive-drop\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 20:42:46.616330\"",
+ " ]",
+ " ],",
+ " \"pkt4-received\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 20:42:46.616335\"",
+ " ]",
+ " ],",
+ " \"pkt4-release-received\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 20:42:46.616339\"",
+ " ]",
+ " ],",
+ " \"pkt4-request-received\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 20:42:46.616343\"",
+ " ]",
+ " ],",
+ " \"pkt4-sent\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 20:42:46.616348\"",
+ " ]",
+ " ],",
+ " \"pkt4-unknown-received\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 20:42:46.616354\"",
+ " ]",
+ " ],",
+ " \"reclaimed-declined-addresses\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 20:42:46.836159\"",
+ " ]",
+ " ],",
+ " \"reclaimed-leases\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 20:42:46.836163\"",
+ " ]",
+ " ],",
+ " \"v4-allocation-fail\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 20:42:46.616358\"",
+ " ]",
+ " ],",
+ " \"v4-allocation-fail-classes\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 20:42:46.616363\"",
+ " ]",
+ " ],",
+ " \"v4-allocation-fail-no-pools\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 20:42:46.616368\"",
+ " ]",
+ " ],",
+ " \"v4-allocation-fail-shared-network\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 20:42:46.616372\"",
+ " ]",
+ " ],",
+ " \"v4-allocation-fail-subnet\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 20:42:46.616376\"",
+ " ]",
+ " ],",
+ " \"v4-lease-reuses\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 20:42:46.616410\"",
+ " ]",
+ " ],",
+ " \"v4-reservation-conflicts\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 20:42:46.616412\"",
+ " ]",
+ " ]",
+ " }",
+ "}",
+ "",
+ "or",
+ "",
+ "{",
+ " \"result\": 0,",
+ " \"arguments\": {",
+ " \"assigned-nas\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 21:28:57.196757\"",
+ " ]",
+ " ],",
+ " \"assigned-pds\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 21:28:57.196757\"",
+ " ]",
+ " ],",
+ " \"cumulative-assigned-nas\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 21:28:57.196757\"",
+ " ]",
+ " ],",
+ " \"cumulative-assigned-pds\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 21:28:57.196758\"",
+ " ]",
+ " ],",
+ " \"declined-addresses\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 21:28:57.196754\"",
+ " ]",
+ " ],",
+ " \"pkt6-advertise-received\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 21:28:57.177731\"",
+ " ]",
+ " ],",
+ " \"pkt6-advertise-sent\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 21:28:57.177739\"",
+ " ]",
+ " ],",
+ " \"pkt6-decline-received\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 21:28:57.177739\"",
+ " ]",
+ " ],",
+ " \"pkt6-dhcpv4-query-received\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 21:28:57.177740\"",
+ " ]",
+ " ],",
+ " \"pkt6-dhcpv4-response-received\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 21:28:57.177740\"",
+ " ]",
+ " ],",
+ " \"pkt6-dhcpv4-response-sent\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 21:28:57.177741\"",
+ " ]",
+ " ],",
+ " \"pkt6-infrequest-received\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 21:28:57.177742\"",
+ " ]",
+ " ],",
+ " \"pkt6-parse-failed\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 21:28:57.177742\"",
+ " ]",
+ " ],",
+ " \"pkt6-rebind-received\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 21:28:57.177743\"",
+ " ]",
+ " ],",
+ " \"pkt6-receive-drop\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 21:28:57.177743\"",
+ " ]",
+ " ],",
+ " \"pkt6-received\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 21:28:57.177744\"",
+ " ]",
+ " ],",
+ " \"pkt6-release-received\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 21:28:57.177744\"",
+ " ]",
+ " ],",
+ " \"pkt6-renew-received\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 21:28:57.177745\"",
+ " ]",
+ " ],",
+ " \"pkt6-reply-received\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 21:28:57.177745\"",
+ " ]",
+ " ],",
+ " \"pkt6-reply-sent\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 21:28:57.177746\"",
+ " ]",
+ " ],",
+ " \"pkt6-request-received\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 21:28:57.177747\"",
+ " ]",
+ " ],",
+ " \"pkt6-sent\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 21:28:57.177747\"",
+ " ]",
+ " ],",
+ " \"pkt6-solicit-received\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 21:28:57.177748\"",
+ " ]",
+ " ],",
+ " \"pkt6-unknown-received\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 21:28:57.177748\"",
+ " ]",
+ " ],",
+ " \"reclaimed-declined-addresses\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 21:28:57.196755\"",
+ " ]",
+ " ],",
+ " \"reclaimed-leases\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 21:28:57.196756\"",
+ " ]",
+ " ],",
+ " \"v6-allocation-fail\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 21:28:57.177749\"",
+ " ]",
+ " ],",
+ " \"v6-allocation-fail-classes\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 21:28:57.177755\"",
+ " ]",
+ " ],",
+ " \"v6-allocation-fail-no-pools\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 21:28:57.177756\"",
+ " ]",
+ " ],",
+ " \"v6-allocation-fail-shared-network\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 21:28:57.177756\"",
+ " ]",
+ " ],",
+ " \"v6-allocation-fail-subnet\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 21:28:57.177757\"",
+ " ]",
+ " ],",
+ " \"v6-ia-na-lease-reuses\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 21:28:57.177757\"",
+ " ]",
+ " ],",
+ " \"v6-ia-pd-lease-reuses\": [",
+ " [",
+ " 0,",
+ " \"2023-06-13 21:28:57.177758\"",
+ " ]",
+ " ]",
+ " }",
+ "}"
+ ],
+
+ "description": "See <xref linkend=\"command-statistic-global-get-all\"/>",
+ "name": "statistic-global-get-all",
+ "support": [
+ "kea-dhcp4",
+ "kea-dhcp6"
+ ]
+}