collectd.conf.tpl 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. Hostname "{{ HOST_NAME }}"
  2. FQDNLookup false
  3. Interval {{ COLLECT_INTERVAL | default("10") }}
  4. Timeout 2
  5. ReadThreads 5
  6. LoadPlugin cpu
  7. LoadPlugin df
  8. LoadPlugin load
  9. LoadPlugin memory
  10. LoadPlugin disk
  11. LoadPlugin interface
  12. LoadPlugin uptime
  13. LoadPlugin swap
  14. LoadPlugin write_graphite
  15. LoadPlugin processes
  16. LoadPlugin aggregation
  17. LoadPlugin match_regex
  18. # LoadPlugin memcached
  19. <Plugin df>
  20. # expose host's mounts into container using -v /:/host:ro (location inside container does not matter much)
  21. # ignore rootfs; else, the root file-system would appear twice, causing
  22. # one of the updates to fail and spam the log
  23. FSType rootfs
  24. # ignore the usual virtual / temporary file-systems
  25. FSType sysfs
  26. FSType proc
  27. FSType devtmpfs
  28. FSType devpts
  29. FSType tmpfs
  30. FSType fusectl
  31. FSType cgroup
  32. FSType overlay
  33. FSType debugfs
  34. FSType pstore
  35. FSType securityfs
  36. FSType hugetlbfs
  37. FSType squashfs
  38. FSType mqueue
  39. MountPoint "/etc/resolv.conf"
  40. MountPoint "/etc/hostname"
  41. MountPoint "/etc/hosts"
  42. IgnoreSelected true
  43. ReportByDevice false
  44. ReportReserved true
  45. ReportInodes true
  46. ValuesAbsolute true
  47. ValuesPercentage true
  48. ReportInodes true
  49. </Plugin>
  50. <Plugin "disk">
  51. Disk "/^[hs]d[a-z]/"
  52. IgnoreSelected false
  53. </Plugin>
  54. <Plugin "aggregation">
  55. <Aggregation>
  56. Plugin "cpu"
  57. Type "cpu"
  58. GroupBy "Host"
  59. GroupBy "TypeInstance"
  60. CalculateAverage true
  61. </Aggregation>
  62. </Plugin>
  63. <Plugin interface>
  64. Interface "lo"
  65. Interface "/^veth.*/"
  66. Interface "/^docker.*/"
  67. IgnoreSelected true
  68. </Plugin>
  69. # <Plugin "memcached">
  70. # Host "memcached"
  71. # Port "11211"
  72. # </Plugin>
  73. <Chain "PostCache">
  74. <Rule>
  75. <Match regex>
  76. Plugin "^cpu$"
  77. PluginInstance "^[0-9]+$"
  78. </Match>
  79. <Target write>
  80. Plugin "aggregation"
  81. </Target>
  82. Target stop
  83. </Rule>
  84. Target "write"
  85. </Chain>
  86. <Plugin "write_graphite">
  87. <Carbon>
  88. Host "{{ GRAPHITE_HOST }}"
  89. Port "{{ GRAPHITE_PORT | default("2003") }}"
  90. Prefix "{{ GRAPHITE_PREFIX | default("collectd.") }}"
  91. EscapeCharacter "_"
  92. SeparateInstances true
  93. StoreRates true
  94. AlwaysAppendDS false
  95. </Carbon>
  96. </Plugin>