Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion content/momentum/4/config-options-summary.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
lastUpdated: "09/20/2023"
lastUpdated: "12/31/2025"
title: "Configuration Options Summary"
description: "This chapter lists all configuration options visible in the following scopes global domain host binding binding group security pathway pathway group listener listen peer threadpool debug flags and cluster as well as in the listener specific scope Module specific options are documented in the module documentation and options specific to..."
---
Expand Down Expand Up @@ -111,6 +111,8 @@ The `Version` column indicated the version(s) of Momentum that support the optio
| [debug](/momentum/4/config/ref-debug-flags) – Set the debug level | na |   | 4.0 and later | debug_flags |
| [debug_flags](/momentum/4/config/ref-debug-flags) *(scope)* – Configure debug verbosity | na |   | 4.0 and later | global |
| [debug_level](/momentum/4/4-module-config) – Set the module debug level (applicable to all modules) (cluster-specific) | na | error | 4.0 and later | cluster |
| [debug_throttle_max_num_same_message](/momentum/4/config/ref-debug-throttle) – Maximum number of identical debug messages to log within an interval | na | 0 | 5.2 and later | global |
| [debug_throttle_period_secs](/momentum/4/config/ref-debug-throttle) – Time interval for debug message throttling, in seconds | na | 1 | 5.2 and later | global |
| [default_binding](/momentum/4/config/ref-default-binding) – Control the default binding | sending | normal | 4.0 and later | global |
| [default_charset](/momentum/4/config/ref-default-charset) – Control the character set | both | us-ascii | 4.0 and later | global, pathway, pathway_group |
| [delay_dsn_max_retry_interval](/momentum/4/config/ref-delay-dsn-max-retry-interval) – Maximum interval for sending DSNs to the sender of a message that has not yet been delivered | sending | 43200 | 4.0 and later | binding, binding_group, domain, global |
Expand Down
92 changes: 92 additions & 0 deletions content/momentum/4/config/ref-debug-throttle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
---
lastUpdated: "12/31/2025"
title: "Throttling Debug Messages"
description: "Configure throttling to tell Momentum how to suppress repeated debug messages. When using the default logging module the messages will appear in the paniclog. The throttle is a decimal number representing the maximum number of repeated debug messages to log within a specified time interval"
---

When using the default logging module, debug messages will appear in the [paniclog](/momentum/4/log-formats-paniclog)
depending on subsystem and level settings configured in [Debug_Flags](/momentum/4/config/ref-debug-flags). `Debug_Flags` is
usually empty, so very few events are written to the `paniclog`. However, under certain circumstances, you need to get more
information about some subsystem's behavior (e.g., SMTP), then by setting `Debug_Flags`, you can enable more verbose logging
into `paniclog`. On the other hand, depending on the chosen level, `paniclog` may get populated with several lines of the same
message, including some that might not be of your interest.

Momentum’s debug throttling configuration allows you to suppress repeated debug messages. The throttle suppresses the logging
of repeated messages beyond a specified limit during a time interval also specified. It is a global setting that applies to
messages of all subsystems.

> **NOTE:** Debug throttling global configuration **DOES NOT** apply to messages logged at the `CRITICAL`, `ERROR`, or
> `WARNING` levels of any subsystem, due to their relevance for operation and diagnosis.

It is important to note that debug throttling is applied not necessarily to *identical* messages, but to messages that are
considered the same after removing variable parts such as timestamps, IP addresses, or other dynamic content. In other words,
if the source of the message is something like this:

```
<timestamp> Message received from: <mailfrom>
```

then all messages that match this pattern will be considered the same for throttling purposes, regardless of the actual
values of `<timestamp>` and `<mailfrom>`. This happens because the default logging module is based on `printf`-style
format strings, which allows variable content in log messages, and it is the format string that determines message sameness.

> __**_WARNING:_**__ Be cautious when enabling debug throttling, as it may cause some performance overhead due to the additional
> processing required to track and suppress repeated messages.
Comment on lines +33 to +34
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really non-trivial? I wouldn't expect there'd be that many unique format strings, and we save the cost of logging the msgs.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug throttling is a feature that I believe is most useful when turning on debugging messages (level >= INFO), and, depending on the subsystem the customer enables, many different strings (in different formats) can be printed.


<a name="conf.ref.debug_throttle"></a>
# Configuration options

Debug throttling is configured using the following options in the global scope of your `ecelerity.conf` file:
- **debug_throttle_max_num_same_message**
- **debug_throttle_period_secs**

<a name="conf.ref.debug_throttle_max_num_same_message"></a>
## Maximum number of the same message

<a name="conf.ref.debug_throttle_max_num_same_message.name"></a>
### Name

`debug_throttle_max_num_same_message`

<a name="conf.ref.debug_throttle_max_num_same_message.description"></a>
### Description

Sets the maximum number of repeated debug messages to log within a specified time interval. The default is `0`, which means no
throttling is applied to the logging of repeated debug messages.

<a name="conf.ref.debug_throttle_period_secs.example"></a>
### Example

```
debug_throttle_max_num_same_message = 5
```

With this configuration, only five lines of the same debug message will be logged during the time interval specified by
Comment thread
dkoerichbird marked this conversation as resolved.
Outdated
`debug_throttle_period_secs`.

<a name="conf.ref.debug_throttle_period_secs"></a>
## Time interval of throttling

<a name="conf.ref.debug_throttle_period_secs.name"></a>
### Name
`debug_throttle_period_secs`

<a name="conf.ref.debug_throttle_period_secs.description"></a>
### Description

Sets the time interval in seconds during which repeated debug messages are counted for throttling purposes. The default is
`1` second, with a maximum of `60` seconds.

<a name="conf.ref.debug_throttle_period_secs.example"></a>
### Example
```
debug_throttle_period_secs = 30
```
With this configuration, the time interval for counting repeated debug messages is set to 30 seconds. Combined with the
previous example for `debug_throttle_max_num_same_message`, only five lines of the same debug message will be logged every
30 seconds.

<a name="conf.ref.debug_throttle.scope"></a>
# Scope

Debug throttling options are valid in the global scope.
6 changes: 4 additions & 2 deletions content/momentum/4/console-commands/summary-reset.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<a name="idp10810640"></a>
## See Also

[binding summary](/momentum/4/console-commands/binding-summary), [summary](/momentum/4/console-commands/summary)
[binding summary](/momentum/4/console-commands/binding-summary), [summary](/momentum/4/console-commands/summary)
25 changes: 21 additions & 4 deletions content/momentum/4/http-api-stats/summary.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
---
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"
---

<a name="http_api_stats.summary"></a>
## 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`).

Expand Down Expand Up @@ -323,10 +327,23 @@ The number of seconds that Momentum has been running continuously.

</dl>

### 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.
8 changes: 5 additions & 3 deletions content/momentum/4/modules/clamav.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
---
lastUpdated: "03/26/2020"
lastUpdated: "12/31/2025"
title: "clamav – ClamAV"
description: "The clamav module is an open source antivirus engine that is part of the default Momentum installation The following is an example configuration Example 71 28 clamav Configuration In order to use this module you must install Clam AV on your server and update it as needed or desired Configure..."
---

<a name="idp20200832"></a>

The clamav module is an open source antivirus engine that is part of the default Momentum installation.
The clamav module allows integration with the open source ClamAV antivirus engine.

> **NOTE:** Since version 5.2, the `msys-clamav` package, which contained the ClamAV engine, is no longer shipped with the Momentum installation bundle. To use this clamav module, the engine must be installed using the general available ClamAV packages (e.g., `clamav` and `clamd` RPMs), then configured and maintained separately by following the official ClamAV [documentation](https://docs.clamav.net/).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this true for all OSs?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes; msys-clamav isn't expected to be shipped anymore with Momentum 5.2 in all supported on-prem OSes: https://github.com/SparkPost/Momentum/commit/04686a61866b7df44270700885499e10b1c29371


### <a name="idp20203168"></a> Configuration

Expand Down Expand Up @@ -86,4 +88,4 @@ These functions return four values:

* The *engine scan code* or `nil` if no engine scan code is available. If the scan result is msys.av.EC_AV_CLEAN, this code will be either `OK` or `Empty file`.

For additional details about these functions, see [msys.av.scan](/momentum/4/lua/ref-msys-av-scan) and [msys.av.scan_part](/momentum/4/lua/ref-msys-av-scan-part).
For additional details about these functions, see [msys.av.scan](/momentum/4/lua/ref-msys-av-scan) and [msys.av.scan_part](/momentum/4/lua/ref-msys-av-scan-part).
Loading