-
Notifications
You must be signed in to change notification settings - Fork 384
Configuration
If you've installed diamond via a package, a example configuration file is /etc/diamond/diamond.cfg.example. Please copy this to /etc/diamond/diamond.cfg and configure at will. By default, diamond will push to a graphite server host "graphite". You should probably change this to point to your own graphite server.
Other configuration should not be necessary.
By default diamond publishes metrics using the following form:
systems.<hostname>.<metrics>.<metric>
You can override the "systems" portion of the metric path by changing the "path_prefix" setting in the configuration file.
Collectors that require extra configuration settings will have a configuration file with defaults located in the collectors_path/collector/collector.conf file. To change the settings, please copy this file to collectors_config_path and change. This way, if future changes to the module change or add settings, your overrides will be preserved.
Diamond defaults to logging at /var/log/diamond/diamond.log
Sample of configuration to have log sent to both /var/log/diamond/diamond.log AND local syslog daemon:
[handlers]
keys = rotated_file,syslog
[loggers]
keys = root
[formatters]
keys = syslog,default
[logger_root]
level = INFO
handlers = syslog,rotated_file
[handler_syslog]
class = handlers.SysLogHandler
level = DEBUG
formatter = syslog
args = ('/dev/log',)
[formatter_syslog]
format = %(asctime)-15s diamond[%(process)d] %(message)s
datefmt = %b %d %H:%M:%S
[handler_rotated_file]
class = handlers.TimedRotatingFileHandler
level = DEBUG
formatter = default
# rotate at midnight, each day and keep 7 days
args = ('/var/log/diamond/diamond.log', 'midnight', 1, 7)
[formatter_default]
format = [%(asctime)s] [%(threadName)s] %(message)s
datefmt =
Every collector has some default options
- enabled - True or False - Run this collector?
- path_prefix - Base path to put all metrics
- path - Path on the tree to place the metrics
- interval - Default Poll Interval (seconds)
- splay - Default splay time (seconds)
- method - Threading model to use, Sequential or Threaded
- byte_unit - List of units to convert bit/byte numeric types to. Defaults to bytes
- hostname - Hardcode an hostname rather then finding one
- hostname_method - Change the method to find the hostname. Valid options are
- fqdn_short = Default. Similar to hostname -s
- fqdn_rev = hostname in reverse (com.example.www)
- uname_short = Similar to uname -n, but only the first part
- uname_rev = uname -r in reverse (com.example.www)