Statistics Resource
The Resource defines the statistic collector function that can send
information to a Graphite instance, to a CSV
file or to bconsole
with the statistics command (See for more information).
Statistics Start of the resource. Statistics directives are optional.
Name = <name> The Statistics directive name is used by the system administrator. This directive is required.
Description = <string> The text field contains a description of the resource that will be displayed in the graphical user interface. This directive is optional.
Interval = <time-interval> The Interval The directive instructs the Statistics collector thread how long it should sleep between every collection iteration. This directive is optional and the default value is 300 seconds.
Type = <CSV|Graphite> The Type The directive specifies the Statistics backend, which may be one of the following: CSV or Graphite. This directive is required.
CSV
is a simple file level backend which saves all required metrics with the
following format to the file: “<time>, <metric>, <value> \n”
Where <time> is a standard Unix time (a number of seconds from 01/01/1970) with local timezone as
returned by a system call time(), <metric> is a Bacula metric string and is a metric value which
could be in numeric format (int
/float
) or a string True or False for boolean variable.
The CSV
backend requires the parameter.
Graphite is a network backend which will send all required metrics to a Graphite server. The Graphite backend requires the Host= and Port= directives to be set.
If the Graphite server is not available, the metrics are automatically spooled in the working directory. When the server can be reached again, spooled metrics are despooled automatically and the spooling function is suspended.
Metrics = <metricspec> The Metrics directive allow metric filtering and is a filter which enables to use * and ? characters to match the required metric name in the same way as found in shell wildcard resolution. You can exclude filtered metric with ! prefix. You can define any number of filters for a single Statistics. Metrics filter is executed in order as found in configuration. This directive is optional and if not used all available metrics will be saved by this collector backend.
Example:
# Include all metric starting with "bacula.jobs"
Metrics = "bacula.jobs.*"
# Exclude any metric starting with "bacula.jobs"
Metrics = "!bacula.jobs.*"
Prefix = <string> The Prefix allows to alter the metrics name saved by collector to distinguish between different installations or daemons. This directive is optional. The prefix string will be added to metric name as: “<prefix>.<metric_name>”
File = <filename> The File is used by the CSV
collector backend and point to the full path
and filename of the file where metrics will be saved. With the CSV
type, the File directive is
required. The collector thread must have the permissions to write to the selected file or create a new
file if the file doesn’t exist. If collector is unable to write to the file or create a new one then the
collection terminates and an error message will be generated. The file is only open during the dump and
is closed otherwise. Statistics file rotation could be executed by a mv shell command.
Host = <hostname> The Host directive is used for Graphite backend and specify the hostname or
the IP
address of the Graphite server. When the directive Type is set to Graphite, the Host directive
is required.
Host = <number> The Port directive is used for Graphite backend and specify the TCP
port
number of the Graphite server. When the directive Type is set to Graphite, the directive Port is
required.
See also
Go back to:
Go back to Storage Daemon Resource Types page.
Go back to the Technical Reference for Storage Daemon.
Go back to the main Technical Reference page.