Wydawca (split by node):   Section:   Chapter:FastBack: configuring   Up: mod_mailutils   FastForward: wydawca.conf   Contents: Table of ContentsIndex: Concept Index

4.15.3.3 Statistic Reports

mod_mailutils: mail-statistics { … }

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;
}
mail-statistics: message text-or-id

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.

mail-statistics: statistics item-list

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);
mail-statistics: gpg-sign key

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:

VariableReplaced with
dateCurrent date and time in the current locale.
stat:errorsNumber of errors detected.
stat:warningsNumber of warnings reported.
stat:bad_signaturesNumber of bad signatures detected.
stat:access_violationsNumber of access violation attempts.
stat:complete_tripletsNumber of complete triplets processed.
stat:incomplete_tripletsNumber of incomplete triplets left in the source directory.
stat:bad_tripletsNumber of bad triplets seen.
stat:expired_tripletsNumber of expired triplets.
stat:triplet_successNumber of successfully processed triplets.
stat:uploadsNumber of successful uploads.
stat:archivesNumber of archivations performed.
stat:symlinksNumber of symbolic links created.
stat:rmsymlinksNumber of symbolic links removed.
stat:check_failuresNumber 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;
}

Wydawca (split by node):   Section:   Chapter:FastBack: configuring   Up: mod_mailutils   FastForward: wydawca.conf   Contents: Table of ContentsIndex: Concept Index