Wydawca |
|
Release Submission Daemon |
Sergey Poznyakoff |
The mail-statistics
statement in the module-init
section
for mod_mailutils
configures the statistic reports
sent to the system administrator.
mail-statistics { message text-or-id; statistics item-list; gpg-sign key; }
To arrange for sending the reports, the configuration must contain the following statement:
notify-event { event statistics; module mailutils; }
Define the message text. The argument is either the message text
template, or a reference to a template previously defined by a
define-message
(see templates). The reference syntax is:
message @name;
where name is the message name as used in define-message
.
The argument is a list of statistic item names as described in statistics. A report will be sent only if statistic counters for at least one of the requested items are not zero. For example, the following statement requires sending notifications only if there occurred any errors or access violation attempts, or any bad signature was uploaded:
statistics (errors, access-violations, bad-signatures);
If this statement is present, the message will be signed using the supplied GPG key. The key is looked up in the GPG home directory (see gpg-homedir).
The statistics message is sent to addresses configured by
admin-address
statement (see admin-address).
The variables available for use in statistic reports are:
Variable | Replaced with |
---|---|
date | Current date and time in the current locale. |
stat:errors | Number of errors detected. |
stat:warnings | Number of warnings reported. |
stat:bad_signatures | Number of bad signatures detected. |
stat:access_violations | Number of access violation attempts. |
stat:complete_triplets | Number of complete triplets processed. |
stat:incomplete_triplets | Number of incomplete triplets left in the source directory. |
stat:bad_triplets | Number of bad triplets seen. |
stat:expired_triplets | Number of expired triplets. |
stat:triplet_success | Number of successfully processed triplets. |
stat:uploads | Number of successful uploads. |
stat:archives | Number of archivations performed. |
stat:symlinks | Number of symbolic links created. |
stat:rmsymlinks | Number of symbolic links removed. |
stat:check_failures | Number of verification failures (see verification). |
An example definition of the admin notification template follows:
mail-statistics { statistics (errors,warnings,bad_signatures, access_violations); message <<EOT Subject: Wydawca stats This is to notify you that my run on ${date} caused the following results: errors ............................. ${stat:errors} warning ............................ ${stat:warnings} bad signatures ..................... ${stat:bad_signatures} access violation attempts .......... ${stat:access_violations} Regards, Wydawca EOT; }
This document was generated on January 6, 2021 using makeinfo.
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.