Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Release 0.3.0 #437

Closed
wants to merge 53 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
50fc3ec
Updating system plugins for 0.3.0
sparrc Dec 11, 2015
97a66b7
Updating aerospike & apache plugins for 0.3.0
sparrc Dec 14, 2015
3be111a
Breakout JSON flattening into internal package, exec & elasticsearch …
sparrc Dec 14, 2015
38d6cb9
0.3.0: HAProxy
sparrc Dec 14, 2015
4798bd9
0.3.0 httpjson
sparrc Dec 14, 2015
e30e98a
0.3.0: leofs & lustre2
sparrc Dec 14, 2015
ce7b481
0.3.0: mailchimp & memcached
sparrc Dec 14, 2015
92343d9
0.3.0: ping, mysql, nginx
sparrc Dec 15, 2015
2749dcd
0.3.0: procstat
sparrc Dec 15, 2015
7746a2b
0.3.0: prometheus & puppetagent
sparrc Dec 15, 2015
6fcd05b
0.3.0 redis & rabbitmq
sparrc Dec 15, 2015
5f42629
0.3.0: trig and twemproxy
sparrc Dec 15, 2015
a34418d
backwards compatability for io->diskio change
sparrc Dec 15, 2015
5aca58a
0.3.0: zookeeper and zfs
sparrc Dec 15, 2015
aba123d
0.3.0: rethinkdb
sparrc Dec 15, 2015
9c5321c
0.3.0 HAProxy rebase
sparrc Dec 18, 2015
64a8324
0.3.0: postgresql and phpfpm
sparrc Dec 19, 2015
30d8ed4
0.3.0: mongodb and jolokia
sparrc Dec 19, 2015
ec39d10
0.3.0 output: datadog and amon
sparrc Dec 19, 2015
2611931
0.3.0 output: librato
sparrc Dec 19, 2015
40a3fea
0.3.0 outputs: opentsdb
sparrc Dec 19, 2015
96e54ab
CHANGELOG update
sparrc Dec 19, 2015
f60d846
0.3.0 outputs: riemann
sparrc Dec 19, 2015
41374aa
0.3.0 Removing internal parallelism: httpjson and exec
sparrc Dec 19, 2015
e25ac0d
0.3.0 Removing internal parallelism: postgresql
sparrc Dec 19, 2015
c891467
0.3.0 Removing internal parallelism: procstat
sparrc Dec 19, 2015
2e764cb
0.3.0 Removing internal parallelism: twemproxy and rabbitmq
sparrc Dec 20, 2015
4bd5b6a
Fix httpjson panic for nil request body
sparrc Dec 21, 2015
498482d
0.3.0 unit tests: system plugins
sparrc Jan 5, 2016
2e20fc4
0.3.0 unit tests: aerospike, apache, bcache
sparrc Jan 6, 2016
c4a7711
0.3.0 unit tests: disque and elasticsearch
sparrc Jan 6, 2016
524fdde
0.3.0 unit tests: exec, httpjson, and haproxy
sparrc Jan 6, 2016
9ada89d
0.3.0 unit tests: jolokia, kafka_consumer, leofs, lustre2
sparrc Jan 6, 2016
6a4bf9f
0.3.0 unit tests: mailchimp, memcached, mongodb
sparrc Jan 7, 2016
6eb49de
0.3.0 unit tests: mysql, nginx, phpfpm, ping, postgres
sparrc Jan 7, 2016
ccbd7bb
0.3.0 unit tests: procstat, prometheus, puppetagent
sparrc Jan 7, 2016
c01594c
0.3.0 unit tests: rabbitmq, redis
sparrc Jan 7, 2016
10f19fa
0.3.0 unit tests: statsd, trig, zookeeper
sparrc Jan 7, 2016
936c5a8
0.3.0 unit tests: rethinkdb, twemproxy, zfs
sparrc Jan 7, 2016
b9869ea
0.3.0 unit tests: influxdb
sparrc Jan 7, 2016
0e398f5
0.3.0 unit tests: amon, datadog, librato
sparrc Jan 7, 2016
4fdcb13
0.3.0 unit tests: internal
sparrc Jan 7, 2016
64b98a9
0.3.0 unit tests: agent and prometheus
sparrc Jan 7, 2016
ad4af06
Update Makefile and Godeps and various fixups
sparrc Jan 7, 2016
30d24a3
0.3.0 documentation changes and improvements
sparrc Jan 7, 2016
9c5db10
renaming plugins -> inputs
sparrc Jan 7, 2016
7499c1f
0.3.0: update README and documentation
sparrc Jan 7, 2016
6496d18
add backwards-compatability for 'plugins', remove [inputs] and [outpu…
sparrc Jan 8, 2016
fd6daaa
0.3.0: update README and documentation
sparrc Jan 7, 2016
07b4a4d
Added a `build.py` script for compiling and packaging. Added post and…
Jan 8, 2016
81fa063
Removed data directory entries, since Telegraf doesn't need them.
Jan 8, 2016
231b5fe
Merge pull request #497 from influxdata/rm-package-updates
rossmcdonald Jan 8, 2016
f37f8ac
Update changelog and readme for package updates
sparrc Jan 8, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ tivan
.vagrant
/telegraf
.idea
*~
*#
48 changes: 43 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,41 @@
## v0.3.0 [unreleased]

### Release Notes
- Linux packages have been taken out of `opt`, the binary is now in `/usr/bin`
and configuration files are in `/etc/telegraf`
- **breaking change** `plugins` have been renamed to `inputs`. This was done because
`plugins` is too generic, as there are now also "output plugins", and will likely
be "aggregator plugins" and "filter plugins" in the future. Additionally,
`inputs/` and `outputs/` directories have been placed in the root-level `plugins/`
directory.
- **breaking change** the `io` plugin has been renamed `diskio`
- **breaking change** plugin measurements aggregated into a single measurement.
- **breaking change** `jolokia` plugin: must use global tag/drop/pass parameters
for configuration.
- **breaking change** `twemproxy` plugin: `prefix` option removed.
- **breaking change** `procstat` cpu measurements are now prepended with `cpu_time_`
instead of only `cpu_`
- **breaking change** some command-line flags have been renamed to separate words.
`-configdirectory` -> `-config-directory`, `-filter` -> `-input-filter`,
`-outputfilter` -> `-output-filter`
- The prometheus plugin schema has not been changed (measurements have not been
aggregated).

### Packaging change note:

RHEL/CentOS users upgrading from 0.2 to 0.3 will probably have their
configurations overwritten by the upgrade. There is a backup stored at
/etc/telegraf/telegraf.conf.$(date +%s).backup.

### Features
- Plugin measurements aggregated into a single measurement.
- Added ability to specify per-plugin tags
- Added ability to specify per-plugin measurement suffix and prefix.
(`name_prefix` and `name_suffix`)
- Added ability to override base plugin measurement name. (`name_override`)

### Bugfixes

## v0.2.5 [unreleased]

### Features
Expand Down Expand Up @@ -38,11 +76,11 @@ functional.
same type can be specified, like this:

```
[[plugins.cpu]]
[[inputs.cpu]]
percpu = false
totalcpu = true

[[plugins.cpu]]
[[inputs.cpu]]
percpu = true
totalcpu = false
drop = ["cpu_time"]
Expand All @@ -69,7 +107,7 @@ same type can be specified, like this:
lists of servers/URLs. 0.2.2 is being released solely to fix that bug

### Bugfixes
- [#377](https://github.com/influxdb/telegraf/pull/377): Fix for duplicate slices in plugins.
- [#377](https://github.com/influxdb/telegraf/pull/377): Fix for duplicate slices in inputs.

## v0.2.1 [2015-11-16]

Expand Down Expand Up @@ -130,7 +168,7 @@ be controlled via the `round_interval` and `flush_jitter` config options.
- [#241](https://github.com/influxdb/telegraf/pull/241): MQTT Output. Thanks @shirou!
- Memory plugin: cached and buffered measurements re-added
- Logging: additional logging for each collection interval, track the number
of metrics collected and from how many plugins.
of metrics collected and from how many inputs.
- [#240](https://github.com/influxdb/telegraf/pull/240): procstat plugin, thanks @ranjib!
- [#244](https://github.com/influxdb/telegraf/pull/244): netstat plugin, thanks @shirou!
- [#262](https://github.com/influxdb/telegraf/pull/262): zookeeper plugin, thanks @jrxFive!
Expand Down Expand Up @@ -163,7 +201,7 @@ will still be backwards compatible if only `url` is specified.
- The -test flag will now output two metric collections
- Support for filtering telegraf outputs on the CLI -- Telegraf will now
allow filtering of output sinks on the command-line using the `-outputfilter`
flag, much like how the `-filter` flag works for plugins.
flag, much like how the `-filter` flag works for inputs.
- Support for filtering on config-file creation -- Telegraf now supports
filtering to -sample-config command. You can now run
`telegraf -sample-config -filter cpu -outputfilter influxdb` to get a config
Expand Down
199 changes: 199 additions & 0 deletions CONFIGURATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,199 @@
# Telegraf Configuration

## Generating a Configuration File

A default Telegraf config file can be generated using the `-sample-config` flag,
like this: `telegraf -sample-config`

To generate a file with specific inputs and outputs, you can use the
`-input-filter` and `-output-filter` flags, like this:
`telegraf -sample-config -input-filter cpu:mem:net:swap -output-filter influxdb:kafka`

## Telegraf Agent Configuration

Telegraf has a few options you can configure under the `agent` section of the
config.

* **hostname**: The hostname is passed as a tag. By default this will be
the value returned by `hostname` on the machine running Telegraf.
You can override that value here.
* **interval**: How often to gather metrics. Uses a simple number +
unit parser, e.g. "10s" for 10 seconds or "5m" for 5 minutes.
* **debug**: Set to true to gather and send metrics to STDOUT as well as
InfluxDB.

## Input Configuration

There are some configuration options that are configurable per input:

* **name_override**: Override the base name of the measurement.
(Default is the name of the input).
* **name_prefix**: Specifies a prefix to attach to the measurement name.
* **name_suffix**: Specifies a suffix to attach to the measurement name.
* **tags**: A map of tags to apply to a specific input's measurements.
* **interval**: How often to gather this metric. Normal plugins use a single
global interval, but if one particular input should be run less or more often,
you can configure that here.

### Input Filters

There are also filters that can be configured per input:

* **pass**: An array of strings that is used to filter metrics generated by the
current input. Each string in the array is tested as a glob match against field names
and if it matches, the field is emitted.
* **drop**: The inverse of pass, if a field name matches, it is not emitted.
* **tagpass**: tag names and arrays of strings that are used to filter
measurements by the current input. Each string in the array is tested as a glob
match against the tag name, and if it matches the measurement is emitted.
* **tagdrop**: The inverse of tagpass. If a tag matches, the measurement is not
emitted. This is tested on measurements that have passed the tagpass test.

### Input Configuration Examples

This is a full working config that will output CPU data to an InfluxDB instance
at 192.168.59.103:8086, tagging measurements with dc="denver-1". It will output
measurements at a 10s interval and will collect per-cpu data, dropping any
fields which begin with `time_`.

```toml
[tags]
dc = "denver-1"

[agent]
interval = "10s"

# OUTPUTS
[[outputs.influxdb]]
url = "http://192.168.59.103:8086" # required.
database = "telegraf" # required.
precision = "s"

# INPUTS
[[inputs.cpu]]
percpu = true
totalcpu = false
# filter all fields beginning with 'time_'
drop = ["time_*"]
```

### Input Config: tagpass and tagdrop

```toml
[[inputs.cpu]]
percpu = true
totalcpu = false
drop = ["cpu_time"]
# Don't collect CPU data for cpu6 & cpu7
[inputs.cpu.tagdrop]
cpu = [ "cpu6", "cpu7" ]

[[inputs.disk]]
[inputs.disk.tagpass]
# tagpass conditions are OR, not AND.
# If the (filesystem is ext4 or xfs) OR (the path is /opt or /home)
# then the metric passes
fstype = [ "ext4", "xfs" ]
# Globs can also be used on the tag values
path = [ "/opt", "/home*" ]
```

### Input Config: pass and drop

```toml
# Drop all metrics for guest & steal CPU usage
[[inputs.cpu]]
percpu = false
totalcpu = true
drop = ["usage_guest", "usage_steal"]

# Only store inode related metrics for disks
[[inputs.disk]]
pass = ["inodes*"]
```

### Input config: prefix, suffix, and override

This plugin will emit measurements with the name `cpu_total`

```toml
[[inputs.cpu]]
name_suffix = "_total"
percpu = false
totalcpu = true
```

This will emit measurements with the name `foobar`

```toml
[[inputs.cpu]]
name_override = "foobar"
percpu = false
totalcpu = true
```

### Input config: tags

This plugin will emit measurements with two additional tags: `tag1=foo` and
`tag2=bar`

```toml
[[inputs.cpu]]
percpu = false
totalcpu = true
[inputs.cpu.tags]
tag1 = "foo"
tag2 = "bar"
```

### Multiple inputs of the same type

Additional inputs (or outputs) of the same type can be specified,
just define more instances in the config file. It is highly recommended that
you utilize `name_override`, `name_prefix`, or `name_suffix` config options
to avoid measurement collisions:

```toml
[[inputs.cpu]]
percpu = false
totalcpu = true

[[inputs.cpu]]
percpu = true
totalcpu = false
name_override = "percpu_usage"
drop = ["cpu_time*"]
```

## Output Configuration

Telegraf also supports specifying multiple output sinks to send data to,
configuring each output sink is different, but examples can be
found by running `telegraf -sample-config`.

Outputs also support the same configurable options as inputs
(pass, drop, tagpass, tagdrop)

```toml
[[outputs.influxdb]]
urls = [ "http://localhost:8086" ]
database = "telegraf"
precision = "s"
# Drop all measurements that start with "aerospike"
drop = ["aerospike*"]

[[outputs.influxdb]]
urls = [ "http://localhost:8086" ]
database = "telegraf-aerospike-data"
precision = "s"
# Only accept aerospike data:
pass = ["aerospike*"]

[[outputs.influxdb]]
urls = [ "http://localhost:8086" ]
database = "telegraf-cpu0-data"
precision = "s"
# Only store measurements where the tag "cpu" matches the value "cpu0"
[outputs.influxdb.tagpass]
cpu = ["cpu0"]
```
Loading