Skip to content

Latest commit

 

History

History
169 lines (92 loc) · 6.89 KB

File metadata and controls

169 lines (92 loc) · 6.89 KB

Messages Configuration

[TAG=Resource->Messages] <single: Resource; Messages> [TAG=Messages Resource] <single: Messages Resource>

Messages Resource

The Messages resource defines how messages are to be handled and destinations to which they should be sent.

Even though each daemon has a full message handler, within the and the , you will normally choose to send all the appropriate messages back to the . This permits all the messages associated with a single Job to be combined in the Director and sent as a single email message to the user, or logged together in a single file.

Each message that Bareos generates (i.e. that each daemon generates) has an associated type such as INFO, WARNING, ERROR, FATAL, etc. Using the message resource, you can specify which message types you wish to see and where they should be sent. In addition, a message may be sent to multiple destinations. For example, you may want all error messages both logged as well as sent to you in an email. By defining multiple messages resources, you can have different message handling for each type of Job (e.g. Full backups versus Incremental backups).

In general, messages are attached to a Job and are included in the Job report. There are some rare cases, where this is not possible, e.g. when no job is running, or if a communications error occurs between a daemon and the director. In those cases, the message may remain in the system, and should be flushed at the end of the next Job.

The records contained in a Messages resource consist of a destination specification followed by a list of message-types in the format: [TAG=Messages->destination] <single: Messages; destination>

destination = message-type1, message-type2, message-type3, ...

or for those destinations that need and address specification (e.g. email):

destination = address = message-type1, message-type2, message-type3, ...

where
destination

is one of a predefined set of keywords that define where the message is to be sent (:configdir/messages/Append, :configdir/messages/Console, :configdir/messages/File, :configdir/messages/Mail, ...),

address

varies according to the destination keyword, but is typically an email address or a filename,

message-type <MessageTypes>

is one of a predefined set of keywords that define the type of message generated by Bareos: ERROR, WARNING, FATAL, ...

Message Types

For any destination, the message-type field is a comma separated list of the following types or classes of messages:

info

[TAG=Messages->type->info] <single: Messages; type; info> General information messages.
warning

[TAG=Messages->type->warning] <single: Messages; type; warning> Warning messages. Generally this is some unusual condition but not expected to be serious.
error

[TAG=Messages->type->error] <single: Messages; type; error> Non-fatal error messages. The job continues running. Any error message should be investigated as it means that something went wrong.
fatal

[TAG=Messages->type->fatal] <single: Messages; type; fatal> Fatal error messages. Fatal errors cause the job to terminate.
terminate

[TAG=Messages->type->terminate] <single: Messages; type; terminate> Message generated when the daemon shuts down.
notsaved

[TAG=Messages->type->notsaved] <single: Messages; type; notsaved> Files not saved because of some error. Usually because the file cannot be accessed (i.e. it does not exist or is not mounted).
skipped

[TAG=Messages->type->skipped] <single: Messages; type; skipped> Files that were skipped because of a user supplied option such as an incremental backup or a file that matches an exclusion pattern. This is not considered an error condition such as the files listed for the notsaved type because the configuration file explicitly requests these types of files to be skipped. For example, any unchanged file during an incremental backup, or any subdirectory if the no recursion option is specified.
mount

[TAG=Messages->type->mount] <single: Messages; type; mount> Volume mount or intervention requests from the Storage daemon. These requests require a specific operator intervention for the job to continue.
restored

[TAG=Messages->type->restored] <single: Messages; type; restored> The ls style listing generated for each file restored is sent to this message class.
all

[TAG=Messages->type->all] <single: Messages; type; all> All message types.
security

[TAG=Messages->type->security] <single: Messages; type; security> Security info/warning messages principally from unauthorized connection attempts.
alert

[TAG=Messages->type->alert] <single: Messages; type; alert> Alert messages. These are messages generated by tape alerts.
volmgmt

[TAG=Messages->type->volmgmt] <single: Messages; type; volmgmt> Volume management messages. Currently there are no volume management messages generated.
audit

[TAG=Messages->type->audit] <single: Messages; type; audit> [TAG=auditing] <single: auditing> Audit messages. Interacting with the Bareos Director will be audited. Can be configured with in resource :configdir/director/Auditing.

The following is an example of a valid Messages resource definition, where all messages except files explicitly skipped or daemon termination messages are sent by email to backupoperator@example.com. In addition all mount messages are sent to the operator (i.e. emailed to backupoperator@example.com). Finally all messages other than explicitly skipped files and files saved are sent to the console:

Messages {
  Name = Standard
  Mail = backupoperator@example.com = all, !skipped, !terminate
  Operator = backupoperator@example.com = mount
  Console = all, !skipped, !saved
}

With the exception of the email address, an example Director’s Messages resource is as follows:

Messages {
  Name = Standard
  Mail Command = "/usr/sbin/bsmtp -h mail.example.com  -f \"\(Bareos\) %r\" -s \"Bareos: %t %e of %c %l\" %r"
  Operator Command = "/usr/sbin/bsmtp -h mail.example.com -f \"\(Bareos\) %r\" -s \"Bareos: Intervention needed for %j\" %r"
  Mail On Error = backupoperator@example.com = all, !skipped, !terminate
  Append = "/var/log/bareos/bareos.log" = all, !skipped, !terminate
  Operator = backupoperator@example.com = mount
  Console = all, !skipped, !saved
}