From: Thomas Markwalder Date: Thu, 13 Jun 2024 19:28:06 +0000 (-0400) Subject: [#3328] More doc JSON fixes X-Git-Tag: Kea-2.7.0~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da8046161d1334d9c172b60697ac40fa85f2d9cf;p=thirdparty%2Fkea.git [#3328] More doc JSON fixes And added missing api file modified: hooks-perfmon.rst new file: ../../../src/share/api/perfmon-get-all-durations.json --- diff --git a/doc/sphinx/arm/hooks-perfmon.rst b/doc/sphinx/arm/hooks-perfmon.rst index e4a91555e0..3e65420cc0 100644 --- a/doc/sphinx/arm/hooks-perfmon.rst +++ b/doc/sphinx/arm/hooks-perfmon.rst @@ -237,10 +237,10 @@ reporting at runtime without altering or reloading configuration. :: { - "command": "perfmon-control" + "command": "perfmon-control", "arguments": { "enable-monitoring": true, - "stats-mgr-reporting": false" + "stats-mgr-reporting": false } } @@ -302,9 +302,9 @@ of durations will be returned as a list of individual elements as shown below: "start-time": "2024-06-12 17:52:06.814884", "total-duration-usecs": 23951, "ave-duration-usecs": 47 - }, - .., - ]", + }, + ... + ], "result-set-format": false, "interval-width-secs": 5, "timestamp": "2024-06-12 17:52:22.397233" @@ -346,9 +346,9 @@ a format similar to an SQL result set as follows: 23951, 47 ], - .. + ... ] - } + }, "result-set-format": true, "interval-width-secs": 5, "timestamp": "2024-06-12 17:52:22.397233" @@ -363,7 +363,6 @@ as "" and the remaining values will be zero. .. _perfmon-configuration: - Configuration ~~~~~~~~~~~~~ diff --git a/src/share/api/perfmon-get-all-durations.json b/src/share/api/perfmon-get-all-durations.json new file mode 100644 index 0000000000..7dd8c9ab93 --- /dev/null +++ b/src/share/api/perfmon-get-all-durations.json @@ -0,0 +1,96 @@ +{ + "access": "write", + "avail": "2.7.0", + "brief": [ + "This command fetches all monitored duration data currently held by Perfmon." + ], + "cmd-syntax": [ + "{", + " \"command\": \"perfmon-get-all-durations\",", + " \"arguments\": {", + " \"result-set-format\": true", + " }", + "}", + "" + ], + "description": "See ", + "hook": "perfmon", + "name": "perfmon-get-all-durations", + "resp-comment": [ + "Result 0 is returned if command succeeds along with monitored duration data.", + "Result is 1 if command is invalid or command processing encounters an error." + ], + "resp-syntax": [ + "If result-set-format is false, the output will be as shown below:", + "{", + " \"arguments\": {", + " \"durations\": [{", + " \"ave-duration-usecs\": 47,", + " \"duration-key\": {", + " \"query-type\": \"DHCPDISCOVER\",", + " \"response-type\": \"DHCPOFFER\",", + " \"start-event\": \"buffer_read\",", + " \"stop-event\": \"mt_queued\",", + " \"subnet-id\": 0", + " },", + " \"max-duration-usecs\": 118,", + " \"min-duration-usecs\": 31,", + " \"occurrences\": 501,", + " \"start-time\": \"2024-06-12 17:52:06.814884\",", + " \"total-duration-usecs\": 23951", + " }", + " ..", + " ]", + " \"result-set-format\": false,", + " \"interval-width-secs\": 5,", + " \"timestamp\": \"2024-06-12 17:52:22.397233\"", + " }", + "\"result\": 0,", + "\"text\": \"perfmon-get-all-durations: n found\"", + "}", + "If result-set-format is true, the output will be as shown below:", + "{", + " \"arguments\": {", + " \"durations-result-set\": {", + " \"columns\": [", + " \"query-type\",", + " \"response-type\",", + " \"start-event\",", + " \"end-event\",", + " \"subnet-id\",", + " \"interval-start\",", + " \"occurences\",", + " \"min-duration-usecs\",", + " \"max-duration-usecs\",", + " \"total-duration-usecsave-duration-usecs\"", + " ],", + " \"rows\": [", + " [", + " \"DHCPDISCOVER\",", + " \"DHCPOFFER\",", + " \"buffer_read\",", + " \"mt_queued\",", + " 0,", + " \"2024-06-12 17:52:06.814884\",", + " 501,", + " 31,", + " 118,", + " 23951,", + " 47", + " ],", + " ..", + " ]", + " }", + " \"result-set-format\": true,", + " \"interval-width-secs\": 5,", + " \"timestamp\": \"2024-06-12 17:52:22.397233\"", + " }", + "\"result\": 0,", + "\"text\": \"perfmon-get-all-durations: n found\"", + "}" + ], + "support": [ + "kea-dhcp4", + "kea-dhcp6" + ] +}