# Installed by Browbeat Ansible Installer
# Config type: {{config_type}}

# Interval default is 10s
Interval {{collectd_interval}}

# Loaded Plugins:
LoadPlugin "logfile"
<Plugin "logfile">
  LogLevel "info"
  File "/var/log/collectd.log"
  Timestamp true
</Plugin>

LoadPlugin write_graphite
LoadPlugin cpu
LoadPlugin df
LoadPlugin disk
LoadPlugin interface
LoadPlugin irq
LoadPlugin load
LoadPlugin memory
LoadPlugin numa
LoadPlugin processes
LoadPlugin swap
LoadPlugin turbostat
LoadPlugin unixsock
LoadPlugin uptime

# Open unix domain socket for collectdctl
<Plugin unixsock>
  SocketFile "/var/run/collectd-unixsock"
  SocketGroup "collectd"
  SocketPerms "0770"
  DeleteSocket true
</Plugin>

# Graphite Host Configuration
<Plugin write_graphite>
  <Carbon>
    Host "localhost"
    Port "{{collectd_write_graphite_port}}"
    Prefix "graphite."
    Protocol "tcp"
    LogSendErrors true
    StoreRates true
    AlwaysAppendDS false
    EscapeCharacter "_"
  </Carbon>
</Plugin>

<Plugin df>
  FSType anon_inodefs
  FSType bdev
  FSType cgroup
  FSType cpuset
  FSType debugfs
  FSType devpts
  FSType devtmpfs
  FSType ecryptfs
  FSType fuse
  FSType fusectl
  FSType hugetlbfs
  FSType mqueue
  FSType nfs
  FSType nfs4
  FSType nfsd
  FSType pipefs
  FSType proc
  FSType pstore
  FSType ramfs
  #FSType rootfs
  FSType rpc_pipefs
  FSType securityfs
  FSType sockfs
  FSType sysfs
  FSType tmpfs
  FSType vboxsf
  IgnoreSelected true
  ValuesPercentage true
  ReportInodes true
</Plugin>

<Plugin disk>
  Disk "/^[hsv]d[a-z]+[0-9]?$/"
  Disk "/^nvm/"
  IgnoreSelected false
</Plugin>

<Plugin processes>
  ProcessMatch "carbon-cache" "python.+carbon-cache"
  ProcessMatch "carbon-relay" "python.+carbon-relay"
  ProcessMatch "carbon-aggregator" "python.+carbon-aggregator"
  Process "grafana-server"
  Process "httpd"
  # Collect on collectd process
  Process "collectd"
</Plugin>

<Plugin swap>
  ReportBytes true
  ValuesPercentage true
</Plugin>

# Include other collectd configuration files
Include "/etc/collectd.d"
