diff --git a/content/momentum/4/console-commands/summary-reset.md b/content/momentum/4/console-commands/summary-reset.md index 9679373d..42ef074a 100644 --- a/content/momentum/4/console-commands/summary-reset.md +++ b/content/momentum/4/console-commands/summary-reset.md @@ -21,9 +21,11 @@ summary reset — reset summary statistics statistics cleared. ``` -The **summary reset** command resets the statistics counters of the running instance. It is useful for determining the current performance levels of a long-running Momentum instance, particularly with respect to metrics that are averages, such as Delivery Rate and Reception Rate. +The **summary reset** command resets the statistics counters of the running instance. It is useful for determining the current performance levels of a long-running Momentum instance, particularly with respect to metrics that are averages, such as Delivery Rate and Reception Rate. + +**NOTE:** Since Momentum 5.2, reset of statistics is available through the HTTP API as well. See the [summary](/momentum/4/http-api-stats/summary) documentation for details. ## See Also -[binding summary](/momentum/4/console-commands/binding-summary), [summary](/momentum/4/console-commands/summary) \ No newline at end of file +[binding summary](/momentum/4/console-commands/binding-summary), [summary](/momentum/4/console-commands/summary) diff --git a/content/momentum/4/http-api-stats/summary.md b/content/momentum/4/http-api-stats/summary.md index 7bb43c8c..c9cb1904 100644 --- a/content/momentum/4/http-api-stats/summary.md +++ b/content/momentum/4/http-api-stats/summary.md @@ -1,5 +1,5 @@ --- -lastUpdated: "11/05/2024" +lastUpdated: "12/31/2025" title: "Summary" description: "stats summary show global metrics Perhaps the most common API command stats summary will produce global metrics such as queue sizes message counts and throughput rates since startup or the last reset of statistics" --- @@ -7,15 +7,19 @@ description: "stats summary show global metrics Perhaps the most common API comm ## Name -`/stats/summary` — show global metrics +`/stats/summary` — global metrics ## Synopsis `GET /stats/summary` +`DELETE /stats/summary` + ## Description -Perhaps the most common API command, `/stats/summary` will produce global metrics such as queue sizes, message counts and throughput rates since startup or the last reset of statistics. +### Gather Global Metrics + +Perhaps the most common API command, `GET /stats/summary` will produce global metrics such as queue sizes, message counts and throughput rates since startup or the last reset of statistics. The data is formatted as a JSON object and you might want to use the `curl` command to do the request (e.g. `curl -sS localhost:2081/stats/summary`). @@ -323,10 +327,23 @@ The number of seconds that Momentum has been running continuously. +### Reset Statistics + +You can reset the statistics used to generate this report by issuing a `DELETE` request to the same URL: `DELETE /stats/summary`. This will reset all the cumulative counters to zero and the time-based metrics will be calculated from that point forward. The output of a successful reset operation is as follows: + +```json +{ + "message": "statistics cleared" +} +``` + ## See Also +[summary](/momentum/4/console-commands/summary), [summary reset](/momentum/4/console-commands/summary-reset) ## Note -This command was first implemented in Momentum 4.4.1. +`GET /stats/summary` was first implemented in Momentum 4.4.1. + +`DELETE /stats/summary` was first implemented in Momentum 5.2.