~verterok/charms/trusty/telegraf/fix-apt-install

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Overview

This is a subordinate charm to deploy telegraf metrics agent to collect metrics from all services deployed in the environment.

For details about telegraf see: https://github.com/influxdata/telegraf 

# Usage

Deploy telegraf alonside your service, and also a time series storage (in this case, influxdb)

    juju deploy telegraf 
    juju deploy influxdb 
    juju deploy some-service

Add the relations: 

    juju add-relation telegraf:juju-info some-service:juju-info 
    juju add-relation telegraf:influxdb-api influxdb:api


# Configuration

By default there is no output plugin configured, but a basic set of input plugins are setup, which can be overriden with inputs_config charm config.

The only output plugin supported via relation is influxdb, any other output plugin needs to be configured manually (via juju set)

To use a different metrics storage, e.g: graphite. the plugin configuration needs to be set as a base64 string in outputs_config configuration.

For exmaple, save the following config to a file: 

    [[outputs.graphite]]
      servers = ["10.0.3.231:2003"]
      prefix = "juju_local.devel.telegraf"
      timeout = 10

And then 

    juju set telegraf outputs_config="$(cat graphite-output.conf | base64)"

This will make telegraf agents to send the metrics to the graphite instance.

# Contact Information

- Upstream https://github.com/influxdata/telegraf
- Upstream bug tracker https://github.com/influxdata/telegraf/issues