-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdiamond.conf
118 lines (82 loc) · 2.5 KB
/
diamond.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
################################################################################
# Diamond Configuration File
################################################################################
################################################################################
### Options for the server
[server]
# Handlers for published metrics.
handlers = diamond.handler.influxdbHandler.InfluxdbHandler
# User diamond will run as
# Leave empty to use the current user
user =
# Group diamond will run as
# Leave empty to use the current group
group =
# Pid file
pid_file = /var/run/diamond.pid
# Directory to load collector modules from
collectors_path = /usr/share/diamond/collectors/
# Directory to load collector configs from
collectors_config_path = /etc/diamond/collectors/
# Directory to load handler configs from
handlers_config_path = /etc/diamond/handlers/
# Directory to load handler modules from
handlers_path = /usr/share/diamond/handlers/
### Options for handlers
[handlers]
# daemon logging handler(s)
keys = rotated_file
### Defaults options for all Handlers
[[default]]
[[ArchiveHandler]]
# File to write archive log files
log_file = /var/log/diamond/archive.log
# Number of days to keep archive log files
days = 7
[[InfluxdbHandler]]
hostname = replace-me-influx-hostname
port = 8086
username = root
password = root
database = metrics
time_precision = s
################################################################################
### Options for collectors
[collectors]
[[default]]
hostname = python -c "import requests; print(requests.get('http://replace-me-ec2-metadata-host/latest/meta-data/public-hostname').text)"
hostname_method = shell
interval = 5
################################################################################
# Default enabled collectors
################################################################################
[[CPUCollector]]
enabled = True
[[DiskSpaceCollector]]
enabled = True
[[DiskUsageCollector]]
enabled = True
[[LoadAverageCollector]]
enabled = True
[[MemoryCollector]]
enabled = True
[[VMStatCollector]]
enabled = True
[loggers]
keys = root
[formatters]
keys = default
[logger_root]
# to increase verbosity, set DEBUG
level = INFO
handlers = rotated_file
propagate = 1
[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 =