Browse Source

feat(collectd): updated collectd config

Torkel Ödegaard 9 năm trước cách đây
mục cha
commit
257e6c469e
1 tập tin đã thay đổi với 28 bổ sung4 xóa
  1. 28 4
      docker/blocks/collectd/collectd.conf.tpl

+ 28 - 4
docker/blocks/collectd/collectd.conf.tpl

@@ -14,10 +14,9 @@ LoadPlugin interface
 LoadPlugin uptime
 LoadPlugin swap
 LoadPlugin write_graphite
-
-<Plugin cpu>
-  ReportByCpu {{ REPORT_BY_CPU | default("false") }}
-</Plugin>
+LoadPlugin processes
+LoadPlugin aggregation
+LoadPlugin match_regex
 
 <Plugin df>
   # expose host's mounts into container using -v /:/host:ro  (location inside container does not matter much)
@@ -46,6 +45,9 @@ LoadPlugin write_graphite
   ReportByDevice false
   ReportReserved true
   ReportInodes true
+  ValuesAbsolute true
+  ValuesPercentage true
+  ReportInodes true
 </Plugin>
 
 <Plugin "disk">
@@ -53,6 +55,15 @@ LoadPlugin write_graphite
   IgnoreSelected false
 </Plugin>
 
+<Plugin "aggregation">
+  <Aggregation>
+    Plugin "cpu"
+    Type "cpu"
+    GroupBy "Host"
+    GroupBy "TypeInstance"
+    CalculateAverage true
+  </Aggregation>
+</Plugin>
 
 <Plugin interface>
   Interface "lo"
@@ -61,6 +72,19 @@ LoadPlugin write_graphite
   IgnoreSelected true
 </Plugin>
 
+<Chain "PostCache">
+  <Rule>
+    <Match regex>
+      Plugin "^cpu$"
+      PluginInstance "^[0-9]+$"
+    </Match>
+    <Target write>
+      Plugin "aggregation"
+    </Target>
+    Target stop
+  </Rule>
+  Target "write"
+</Chain>
 
 <Plugin "write_graphite">
  <Carbon>