3 | | == To install on standard CentOS host |
4 | | {{{ |
5 | | #!sh |
6 | | |
7 | | sudo yum install 'collectd' && |
8 | | cp -a '/etc/collectd.conf' '/etc/collectd.conf.orig' && |
9 | | sudo -e '/etc/collectd.conf' && |
10 | | ## <edit /etc/collectd.conf according to the example below> |
11 | | sudo systemctl enable collectd.service && |
12 | | sudo service collectd restart |
13 | | }}} |
14 | | |
15 | | == To configure |
16 | | {{{ |
17 | | ############################################################################## |
18 | | # Global # |
19 | | #----------------------------------------------------------------------------# |
20 | | # Global settings for the daemon. # |
21 | | ############################################################################## |
22 | | |
23 | | #Hostname "localhost" |
24 | | #FQDNLookup true |
25 | | #BaseDir "/var/lib/collectd" |
26 | | #PIDFile "/var/run/collectd.pid" |
27 | | #PluginDir "/usr/lib64/collectd" |
28 | | #TypesDB "/usr/share/collectd/types.db" |
29 | | |
30 | | #----------------------------------------------------------------------------# |
31 | | # When enabled, plugins are loaded automatically with the default options # |
32 | | # when an appropriate <Plugin ...> block is encountered. # |
33 | | # Disabled by default. # |
34 | | #----------------------------------------------------------------------------# |
35 | | #AutoLoadPlugin false |
36 | | |
37 | | #----------------------------------------------------------------------------# |
38 | | # Interval at which to query values. This may be overwritten on a per-plugin # |
39 | | # base by using the 'Interval' option of the LoadPlugin block: # |
40 | | # <LoadPlugin foo> # |
41 | | # Interval 60 # |
42 | | # </LoadPlugin> # |
43 | | #----------------------------------------------------------------------------# |
44 | | Interval 10 |
45 | | |
46 | | #Timeout 2 |
47 | | #ReadThreads 5 |
48 | | #WriteThreads 5 |
49 | | |
50 | | # Limit the size of the write queue. Default is no limit. Setting up a limit is |
51 | | # recommended for servers handling a high volume of traffic. |
52 | | #WriteQueueLimitHigh 1000000 |
53 | | #WriteQueueLimitLow 800000 |
54 | | |
55 | | ############################################################################## |
56 | | # Logging # |
57 | | #----------------------------------------------------------------------------# |
58 | | # Plugins which provide logging functions should be loaded first, so log # |
59 | | # messages generated when loading or configuring other plugins can be # |
60 | | # accessed. # |
61 | | ############################################################################## |
62 | | |
63 | | LoadPlugin logfile |
64 | | <Plugin logfile> |
65 | | LogLevel info |
66 | | File "/var/log/collectd/collectd.log" |
67 | | Timestamp true |
68 | | PrintSeverity false |
69 | | </Plugin> |
70 | | |
71 | | ############################################################################## |
72 | | # LoadPlugin section # |
73 | | #----------------------------------------------------------------------------# |
74 | | # Lines beginning with a single `#' belong to plugins which have been built # |
75 | | # but are disabled by default. # |
76 | | # # |
77 | | # Lines begnning with `##' belong to plugins which have not been built due # |
78 | | # to missing dependencies or because they have been deactivated explicitly. # |
79 | | ############################################################################## |
80 | | |
81 | | LoadPlugin cpu |
82 | | LoadPlugin df |
83 | | <Plugin df> |
84 | | MountPoint "/" |
85 | | IgnoreSelected false |
86 | | ReportByDevice false |
87 | | ReportReserved false |
88 | | ReportInodes true |
89 | | ValuesAbsolute true |
90 | | ValuesPercentage true |
91 | | </Plugin> |
92 | | LoadPlugin disk |
93 | | <Plugin disk> |
94 | | </Plugin> |
95 | | LoadPlugin interface |
96 | | <Plugin interface> |
97 | | Interface "eth0" |
98 | | IgnoreSelected false |
99 | | </Plugin> |
100 | | LoadPlugin load |
101 | | LoadPlugin memory |
102 | | LoadPlugin network |
103 | | <Plugin network> |
104 | | Server "metrics.clarin.eu" "25826" |
105 | | </Plugin> |
106 | | LoadPlugin processes |
107 | | LoadPlugin users |
108 | | |
109 | | Include "/etc/collectd.d" |
110 | | }}} |
| 4 | = Our policy |
| 5 | To install on a standard host, see https://github.com/clarin-eric/default_host_config/blob/master/opt/scripts/collectd.sh |