summarylogtreecommitdiffstats
path: root/collectd.conf
blob: f826e52e39df2edf6a749939ec4025001493af3a (plain)
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
119
Interval 60

# Explicitly set hostname to "" to indicate the default resource.
Hostname ""

# The Stackdriver agent does not use fully qualified domain names.
FQDNLookup false

WriteThreads 1

LoadPlugin syslog
<Plugin "syslog">
  LogLevel "warning"
</Plugin>

# if you uncomment this, you will get collectd logs separate from syslog
#LoadPlugin logfile
#<Plugin "logfile">
#  LogLevel "info"
#  File "/var/log/collectd.log"
#  Timestamp true
#</Plugin>

LoadPlugin df
<Plugin "df">
  FSType "devfs"
  IgnoreSelected true
  ReportByDevice true
  ValuesPercentage true
</Plugin>

LoadPlugin cpu
<Plugin "cpu">
  ValuesPercentage true
  ReportByCpu false
</Plugin>

LoadPlugin swap
<Plugin "swap">
  ValuesPercentage true
</Plugin>

LoadPlugin interface
LoadPlugin disk
LoadPlugin load

LoadPlugin memory
<Plugin "memory">
  ValuesPercentage true
</Plugin>
LoadPlugin processes
LoadPlugin tcpconns
LoadPlugin write_gcm
LoadPlugin match_regex
LoadPlugin match_throttle_metadata_keys
LoadPlugin stackdriver_agent

<Plugin "processes">
  ProcessMatch "all" ".*"
  Detail "ps_cputime"
  Detail "ps_disk_octets"
  Detail "ps_rss"
  Detail "ps_vm"
</Plugin>

<Plugin "disk">
  # No config - collectd fails parsing configuration if tag is empty.
</Plugin>

<Plugin "tcpconns">
  AllPortsSummary true
</Plugin>

LoadPlugin aggregation

<Plugin "write_gcm">
  PrettyPrintJSON false
  # EnableMetadataAgent true
</Plugin>

PostCacheChain "PostCache"
<Chain "PostCache">
  <Rule "processes">
    <Match "regex">
      Plugin "^processes$"
      Type "^(ps_cputime|disk_octets|ps_rss|ps_vm)$"
    </Match>
    <Target "jump">
      Chain "MaybeThrottleProcesses"
    </Target>
    Target "stop"
  </Rule>

  <Rule "otherwise">
    <Match "throttle_metadata_keys">
      OKToThrottle false
      HighWaterMark 5700000000  # 950M * 6
      LowWaterMark 4800000000  # 800M * 6
    </Match>
    <Target "write">
       Plugin "write_gcm"
    </Target>
  </Rule>
</Chain>

<Chain "MaybeThrottleProcesses">
  <Rule "default">
    <Match "throttle_metadata_keys">
      OKToThrottle true
      TrackedMetadata "processes:pid"
      TrackedMetadata "processes:command"
      TrackedMetadata "processes:command_line"
      TrackedMetadata "processes:owner"
    </Match>
    <Target "write">
       Plugin "write_gcm"
    </Target>
  </Rule>
</Chain>