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).
The explanation on how to read the directive format:
Name: Contains the linked name of the directive.
Description: Explains what the directive does.
Value: Indicates what type of value to provide (e.g., <type-specification>).
Data Type: Specifies the type of data expected.
Values: Lists specific acceptable values.
Required: If present, indicates that the directive must be set by the user, there is no default value.
Default: If present, indicates that the directive has a predefined value that does not need to be set by the user, cannot be removed.
Comment: Additional important notes.
Example: Shows a usage example.
Statistics Start of the Statistics resource. Statistics directives are optional.
Description: The Statistics directive name is used by the system administrator.
Value(s):
<name>
Data Type: string
Required: Yes
Description: Description of the resource that will be displayed in the graphical user interface.
Value(s):
<text>
Data Type: string
Description: Instructs the Statistics collector thread how long it should sleep between every collection iteration.
Value(s):
<time>
Data Type: time
Default: 5 minutes
Description: Specifies the Statistics backend, which may be one of the following: CSV or Graphite.
Value(s):
<CSV|Graphite>
Data Type: string
Required: Yes
Comment:
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. TheCSV
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.
Description: Allows 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.
Value(s):
<metric-specification>
Data Type: string list
Comment: 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: See the following example:
# Include all metric starting with "bacula.jobs" Metrics = "bacula.jobs.*" # Exclude any metric starting with "bacula.jobs" Metrics = "!bacula.jobs.*"
Description: Allows to alter the metrics name saved by collector to distinguish between different installations or daemons.
Value(s):
<prefix>
Data Type: string
Comment: This directive is optional. The prefix string will be added to metric name as: “<prefix>.<metric_name>”
Description: The Host directive is used for Graphite backend and specify the hostname or the
IP
address of the Graphite server.Value(s):
<hostname>
Data Type: string
Comment: When the directive Type is set to Graphite, the Host directive is required.
Description: The Port directive is used for Graphite backend and specify the
TCP
port number of the Graphite server.Value(s):
<port-number>
Data Type: positive integer
Comment: When the directive Type is set to Graphite, the directive Port is required.
Description: 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.Value(s):
<filename>
Data Type: string
Comment: 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.
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.