Statistics resource
Configuration directives for the Statistics resource. Every directive is listed; value types and defaults are noted where the source provides them.
Description
Section titled “Description”Description = <string>
The text field contains a description of the Statistics resource that will be displayed in the graphical user interface. This directive is optional.
File = <filename>
The File is used by the CSV statistics 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 statistics thread must have the permissions to write to the selected file or create a new file if the file doesn’t exist. If statistics 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.
Interval
Section titled “Interval”Interval = <time-interval>
The Intervall 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.
Metrics
Section titled “Metrics”Metrics = <metricspec>
The Metrics directive allow metric filtering and <metricspec> 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 statistics backend.
Example:
`
Include all metric starting with “bacula.jobs”
Section titled “Include all metric starting with “bacula.jobs””Metrics = “bacula.jobs.*“
Exclude any metric starting with “bacula.jobs”
Section titled “Exclude any metric starting with “bacula.jobs””Metrics = “!bacula.jobs.*”
`
Name = <name>
The Statistics directive name is used by the system administrator. This directive is required.
Prefix
Section titled “Prefix”Prefix = <string>
The Prefix allows to alter the metrics name saved by statistics to distinguish between different installations or daemons. The prefix string will be added to metric name as: “<prefix>.<metric_name>” This directive is optional.
Statistics
Section titled “Statistics”Start of the Statistics resource. Statistics directives are optional.
Type = <CSV|Graphite>
The Type 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 1/01/1970) with local timezone as returned by a system call time(), <metric> is a NGBackup metric string and <value> 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 File = 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.