collectd is a small daemon which collects system information
periodically and provides mechanisms to monitor and store the values
in a variety of ways. Since the daemon doesn't need to startup every
time it wants to update the values it's very fast and easy on the
system. Also, the statistics are very fine grained since the files are
updated every 10 seconds by default. The collected information can be
used to find current performance bottlenecks (performance analysis)
and predict future system load (capacity planning).
This subordinate charm will deploy collectd daemon
By default metrics are not forwarded or exposed in any way
but that can be achieved using configuration options
Optionally the charm can expose metrics for prometheus scraping.
This requires prometheus-collectd-exporter package to
be available for installation
The charm relates with any principal charm using juju-info interface.
Assuming that the principal service is called ubuntu and have a copy
of collectd subordinate in charms/$distrocodename/collectd relative
to your current directory.
... then to perform a deployment execute the following steps:
juju deploy --repository=charms local:trusty/collectd collectd
juju add-relation ubuntu collectd
To send metrics to the graphite server listening on 192.168.99.10 port 2003:
juju set collectd graphite_endpoint=192.168.99.10:2003
To expose metrics for prometheus on port 9103 under "/metrics" URL:
juju set collectd prometheus_export=http://127.0.0.1:9103/metrics
See config.yaml for more details about configuration options
Branch code to:
Assemble the charm: