Skip to content

Instantly share code, notes, and snippets.

@katzj
Created June 18, 2013 03:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save katzj/81a1cfb57662a56fd660 to your computer and use it in GitHub Desktop.
Save katzj/81a1cfb57662a56fd660 to your computer and use it in GitHub Desktop.
Base Stackdriver collectd config file. Replace {IID} with your instance id and {{API_KEY}} with your Stackdriver API key.
Hostname "{IID}"
Interval 60
LoadPlugin write_http
LoadPlugin syslog
<Plugin "write_http">
<URL "https://collectd-gateway.stackdriver.com/v1/agent?stackdriver-apikey={{API_KEY}}">
Format "JSON"
StoreRates true
</URL>
</Plugin>
LoadPlugin df
<Plugin "df">
FSType "devfs"
IgnoreSelected true
ReportByDevice true
ReportReserved true
</Plugin>
LoadPlugin cpu
LoadPlugin swap
LoadPlugin interface
LoadPlugin disk
LoadPlugin load
LoadPlugin memory
<Plugin "disk">
# No config - collectd fails parsing configuration if tag is empty.
</Plugin>
#LoadPlugin logfile
#<Plugin "logfile">
# LogLevel "info"
# File "/var/log/collectd.log"
# Timestamp true
#</Plugin>
LoadPlugin aggregation
<Plugin "aggregation">
<Aggregation>
Plugin "cpu"
Type "cpu"
GroupBy "Host"
GroupBy "TypeInstance"
CalculateAverage true
</Aggregation>
</Plugin>
# if you have other config, especially for plugins, you can drop them
# into this directory
Include "/opt/stackdriver/collectd/etc/collectd.d"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment