collectd.conf 5 KB
Newer Older
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
#
# Config file for collectd(1).
# Please read collectd.conf(5) for a list of options.
# http://collectd.org/
#

##############################################################################
# Global settings for the daemon.                                            #
##############################################################################

#HostnameReplace

TypesDB     "CD_INST_PATH/share/collectd/types.db"
TypesDB     "CUSTOM_TYPES_DIR/custom_types.db"

Interval 30
AlignRead true

ReadThreads  2
WriteThreads 1

##############################################################################
# Logging                                                                    #
#----------------------------------------------------------------------------#
# Plugins which provide logging functions should be loaded first, so log     #
# messages generated when loading or configuring other plugins can be        #
# accessed.                                                                  #
##############################################################################

LoadPlugin logfile
<Plugin logfile>
  LogLevel info
  File "/tmp/pika_collectd.log" #STDOUT
  Timestamp true
  PrintSeverity false
</Plugin>

##############################################################################
# LoadPlugin section                                                         #
##############################################################################

# plugin read functions are executed in reverse order?

<LoadPlugin memory>
  Interval 30
</LoadPlugin>
<Plugin memory>
  ValuesAbsolute true
  ValuesPercentage false
</Plugin>

<LoadPlugin cpu>
  Interval 30
  AlignReadOffset 0.02
</LoadPlugin>
<Plugin cpu>
  ReportByCpu true
  ReportByState false
  ValuesPercentage true
  ReportNumCpu false
  ReportGuestState false
  SubtractGuestState false
</Plugin>


<LoadPlugin likwid>
   Interval 60
   AlignReadOffset 2
</LoadPlugin>
<Plugin likwid>
  NormalizeFlops flops_any
  AccessMode 0 # 1 for accessdaemon, 0 for direct access (only as root or with perf)
  Mtime 29
  Groups "pika_metrics_1,pika_metrics_2"
  # by default metrics are reported per hardware thread
  PerSocketMetrics "mem_bw,rapl_power"
  MaxValues "ipc:10,flops:1e11,mem_bw:1e12"
  PerCore true
  Verbose 1
</Plugin> #likwid_end

<LoadPlugin python>
   Interval 30
   AlignReadOffset 0.08
</LoadPlugin>
<Plugin python>
87
  ModulePath "/usr/share/collectd/plugins/"
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
  LogTraces true
  Interactive false
  
  Import "influx_write"
  <Module influx_write>
    #INFLUXHOST
    #INFLUXPORT
    #INFLUXUSER
    #INFLUXPWD
    #INFLUXDBNAME
    batch_size 500
    cache_size 4000
    StoreRates true
    PerCore "cpu:avg" #"likwid_cpu:sum" #plugin1:aggregate,plugin2.aggregate
    ssl false
  </Module>
  
  Import "ib_bw"
  <Module ib_bw>
    #devices "/sys/class/infiniband/mlx4_0"
    #directory "/sys/class/infiniband"
    recheck_limit 1440
  </Module>
  Import "lustre_bw"
  <Module lustre_bw>
    #path "Lustre instance paths (comma separated)"
    fsname_and_mount "*:/ws" # for all file systems AND mount points that end with '/ws'
    recheck_limit 360 # every 3h
  </Module>
</Plugin>

LoadPlugin unixsock
<Plugin unixsock>
  SocketFile "/tmp/pika_collectd_unixsock" #socket for notifications
  SocketGroup "root"
  SocketPerms "0770"
  DeleteSocket true
</Plugin>

#LoadPlugin write_log

##############################################################################
# Filter configuration                                                       #
##############################################################################

# Load required matches:
LoadPlugin match_regex
LoadPlugin target_scale
LoadPlugin target_set
PreCacheChain "pika"
<Chain "pika">
  ### ignore other than memory used
  <Rule "mem_used_only">
    <Match "regex">
      Plugin "^memory$"
      TypeInstance "^[f|s|c|b]"
    </Match>
    Target "stop"
  </Rule>
  
  # for the disk plugin, ignore other than disc_octets and disk_ops
  <Rule "disk_o_only">
    <Match "regex">
      Plugin "^disk$"
      Type "^(p|disk_[t|m|i])" #starts with p or disk_t|i|m
      #Type "^(?!disk_o).+" # do not start with "disk_o" # does not work with collectd
    </Match>
    Target "stop"
  </Rule>
  # rename "disc_octets" to "bytes"
  <Rule "rename_disk_octets">
    <Match "regex">
      Plugin "^disk$"
      Type "^disk_octets$"
    </Match>
    <Target "set">
      TypeInstance "bytes"
    </Target>
    Target "write"
    Target "stop"
  </Rule>
  # no need to have an additional "disk" in the field name
  <Rule "rename_disk_ops"> 
    <Match "regex">
      Plugin "^disk$"
      Type "^disk_ops$"
    </Match>
    <Target "set">
      TypeInstance "ops"
    </Target>
    Target "write"
    Target "stop"
  </Rule>
  
  # rename CPU "active" to "used" and multiply each value by 0.01
  <Rule "handle_cpu_active">
    <Match "regex">
      Plugin "^cpu$"
      TypeInstance "^active$"
    </Match>
    <Target "scale">
      Factor 0.01
    </Target>
    <Target "set">
      TypeInstance "used"
    </Target>
    Target "write"
    Target "stop"
  </Rule>
</Chain>