]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3328] More doc JSON fixes
authorThomas Markwalder <tmark@isc.org>
Thu, 13 Jun 2024 19:28:06 +0000 (15:28 -0400)
committerFrancis Dupont <fdupont@isc.org>
Sat, 15 Jun 2024 07:17:39 +0000 (09:17 +0200)
And added missing api file

modified:   hooks-perfmon.rst
new file:   ../../../src/share/api/perfmon-get-all-durations.json

doc/sphinx/arm/hooks-perfmon.rst
src/share/api/perfmon-get-all-durations.json [new file with mode: 0644]

index e4a91555e08d7f3d747802620efdbafced9511ba..3e65420cc0c4e0077257a8e81104724a48b9ce85 100644 (file)
@@ -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 "<none>" 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 (file)
index 0000000..7dd8c9a
--- /dev/null
@@ -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 <xref linkend=\"command-perfmon-get-all-durations\"/>",
+    "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"
+    ]
+}