Skip to content

Commit

Permalink
Seems to be a toml parse bug around triple pounds
Browse files Browse the repository at this point in the history
  • Loading branch information
sparrc committed Feb 18, 2016
1 parent 7def666 commit 8d2e5f0
Show file tree
Hide file tree
Showing 75 changed files with 502 additions and 502 deletions.
16 changes: 8 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ creating the `Parser` object.
You should also add the following to your SampleConfig() return:

```toml
### Data format to consume. This can be "json", "influx" or "graphite"
### Each data format has it's own unique set of configuration options, read
### more about them here:
### https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
## Data format to consume. This can be "json", "influx" or "graphite"
## Each data format has it's own unique set of configuration options, read
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
data_format = "influx"
```

Expand Down Expand Up @@ -244,10 +244,10 @@ instantiating and creating the `Serializer` object.
You should also add the following to your SampleConfig() return:

```toml
### Data format to output. This can be "influx" or "graphite"
### Each data format has it's own unique set of configuration options, read
### more about them here:
### https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md
## Data format to output. This can be "influx" or "graphite"
## Each data format has it's own unique set of configuration options, read
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md
data_format = "influx"
```

Expand Down
72 changes: 36 additions & 36 deletions docs/DATA_FORMATS_INPUT.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,19 @@ example, in the exec plugin:

```toml
[[inputs.exec]]
### Commands array
## Commands array
commands = ["/tmp/test.sh", "/usr/bin/mycollector --foo=bar"]

### measurement name suffix (for separating different commands)
## measurement name suffix (for separating different commands)
name_suffix = "_mycollector"

### Data format to consume. This can be "json", "influx" or "graphite"
### Each data format has it's own unique set of configuration options, read
### more about them here:
### https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
## Data format to consume. This can be "json", "influx" or "graphite"
## Each data format has it's own unique set of configuration options, read
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
data_format = "json"

### Additional configuration options go here
## Additional configuration options go here
```

Each data_format has an additional set of configuration options available, which
Expand All @@ -52,16 +52,16 @@ metrics are parsed directly into Telegraf metrics.

```toml
[[inputs.exec]]
### Commands array
## Commands array
commands = ["/tmp/test.sh", "/usr/bin/mycollector --foo=bar"]

### measurement name suffix (for separating different commands)
## measurement name suffix (for separating different commands)
name_suffix = "_mycollector"

### Data format to consume. This can be "json", "influx" or "graphite"
### Each data format has it's own unique set of configuration options, read
### more about them here:
### https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
## Data format to consume. This can be "json", "influx" or "graphite"
## Each data format has it's own unique set of configuration options, read
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
data_format = "influx"
```

Expand Down Expand Up @@ -97,19 +97,19 @@ For example, if you had this configuration:

```toml
[[inputs.exec]]
### Commands array
## Commands array
commands = ["/tmp/test.sh", "/usr/bin/mycollector --foo=bar"]

### measurement name suffix (for separating different commands)
## measurement name suffix (for separating different commands)
name_suffix = "_mycollector"

### Data format to consume. This can be "json", "influx" or "graphite"
### Each data format has it's own unique set of configuration options, read
### more about them here:
### https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
## Data format to consume. This can be "json", "influx" or "graphite"
## Each data format has it's own unique set of configuration options, read
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
data_format = "json"

### List of tag names to extract from top-level of JSON server response
## List of tag names to extract from top-level of JSON server response
tag_keys = [
"my_tag_1",
"my_tag_2"
Expand Down Expand Up @@ -241,30 +241,30 @@ There are many more options available,

```toml
[[inputs.exec]]
### Commands array
## Commands array
commands = ["/tmp/test.sh", "/usr/bin/mycollector --foo=bar"]

### measurement name suffix (for separating different commands)
## measurement name suffix (for separating different commands)
name_suffix = "_mycollector"

### Data format to consume. This can be "json", "influx" or "graphite" (line-protocol)
### Each data format has it's own unique set of configuration options, read
### more about them here:
### https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
## Data format to consume. This can be "json", "influx" or "graphite" (line-protocol)
## Each data format has it's own unique set of configuration options, read
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
data_format = "graphite"

### This string will be used to join the matched values.
## This string will be used to join the matched values.
separator = "_"

### Each template line requires a template pattern. It can have an optional
### filter before the template and separated by spaces. It can also have optional extra
### tags following the template. Multiple tags should be separated by commas and no spaces
### similar to the line protocol format. There can be only one default template.
### Templates support below format:
### 1. filter + template
### 2. filter + template + extra tag
### 3. filter + template with field key
### 4. default template
## Each template line requires a template pattern. It can have an optional
## filter before the template and separated by spaces. It can also have optional extra
## tags following the template. Multiple tags should be separated by commas and no spaces
## similar to the line protocol format. There can be only one default template.
## Templates support below format:
## 1. filter + template
## 2. filter + template + extra tag
## 3. filter + template with field key
## 4. default template
templates = [
"*.app env.service.resource.measurement",
"stats.* .host.measurement* region=us-west,agent=sensu",
Expand Down
32 changes: 16 additions & 16 deletions docs/DATA_FORMATS_OUTPUT.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ config option, for example, in the `file` output plugin:

```toml
[[outputs.file]]
### Files to write to, "stdout" is a specially handled file.
## Files to write to, "stdout" is a specially handled file.
files = ["stdout"]

### Data format to output. This can be "influx" or "graphite"
### Each data format has it's own unique set of configuration options, read
### more about them here:
### https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md
## Data format to output. This can be "influx" or "graphite"
## Each data format has it's own unique set of configuration options, read
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md
data_format = "influx"

### Additional configuration options go here
## Additional configuration options go here
```

Each data_format has an additional set of configuration options available, which
Expand All @@ -50,13 +50,13 @@ metrics are serialized directly into InfluxDB line-protocol.

```toml
[[outputs.file]]
### Files to write to, "stdout" is a specially handled file.
## Files to write to, "stdout" is a specially handled file.
files = ["stdout", "/tmp/metrics.out"]

### Data format to output. This can be "influx" or "graphite"
### Each data format has it's own unique set of configuration options, read
### more about them here:
### https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md
## Data format to output. This can be "influx" or "graphite"
## Each data format has it's own unique set of configuration options, read
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md
data_format = "influx"
```

Expand Down Expand Up @@ -84,13 +84,13 @@ tars.cpu-total.us-east-1.cpu.usage_idle 98.09 1455320690

```toml
[[outputs.file]]
### Files to write to, "stdout" is a specially handled file.
## Files to write to, "stdout" is a specially handled file.
files = ["stdout", "/tmp/metrics.out"]

### Data format to output. This can be "influx" or "graphite"
### Each data format has it's own unique set of configuration options, read
### more about them here:
### https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md
## Data format to output. This can be "influx" or "graphite"
## Each data format has it's own unique set of configuration options, read
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md
data_format = "influx"

prefix = "telegraf"
Expand Down
36 changes: 18 additions & 18 deletions etc/telegraf.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,37 +16,37 @@

# Configuration for telegraf agent
[agent]
### Default data collection interval for all inputs
## Default data collection interval for all inputs
interval = "10s"
### Rounds collection interval to 'interval'
### ie, if interval="10s" then always collect on :00, :10, :20, etc.
## Rounds collection interval to 'interval'
## ie, if interval="10s" then always collect on :00, :10, :20, etc.
round_interval = true

### Telegraf will cache metric_buffer_limit metrics for each output, and will
### flush this buffer on a successful write.
## Telegraf will cache metric_buffer_limit metrics for each output, and will
## flush this buffer on a successful write.
metric_buffer_limit = 10000
### Flush the buffer whenever full, regardless of flush_interval.
## Flush the buffer whenever full, regardless of flush_interval.
flush_buffer_when_full = true

### Collection jitter is used to jitter the collection by a random amount.
### Each plugin will sleep for a random time within jitter before collecting.
### This can be used to avoid many plugins querying things like sysfs at the
### same time, which can have a measurable effect on the system.
## Collection jitter is used to jitter the collection by a random amount.
## Each plugin will sleep for a random time within jitter before collecting.
## This can be used to avoid many plugins querying things like sysfs at the
## same time, which can have a measurable effect on the system.
collection_jitter = "0s"

### Default flushing interval for all outputs. You shouldn't set this below
### interval. Maximum flush_interval will be flush_interval + flush_jitter
## Default flushing interval for all outputs. You shouldn't set this below
## interval. Maximum flush_interval will be flush_interval + flush_jitter
flush_interval = "10s"
### Jitter the flush interval by a random amount. This is primarily to avoid
### large write spikes for users running a large number of telegraf instances.
### ie, a jitter of 5s and interval 10s means flushes will happen every 10-15s
## Jitter the flush interval by a random amount. This is primarily to avoid
## large write spikes for users running a large number of telegraf instances.
## ie, a jitter of 5s and interval 10s means flushes will happen every 10-15s
flush_jitter = "0s"

### Run telegraf in debug mode
## Run telegraf in debug mode
debug = false
### Run telegraf in quiet mode
## Run telegraf in quiet mode
quiet = false
### Override default hostname, if empty use os.Hostname()
## Override default hostname, if empty use os.Hostname()
hostname = ""


Expand Down
36 changes: 18 additions & 18 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,37 +153,37 @@ var header = `##################################################################
# Configuration for telegraf agent
[agent]
### Default data collection interval for all inputs
## Default data collection interval for all inputs
interval = "10s"
### Rounds collection interval to 'interval'
### ie, if interval="10s" then always collect on :00, :10, :20, etc.
## Rounds collection interval to 'interval'
## ie, if interval="10s" then always collect on :00, :10, :20, etc.
round_interval = true
### Telegraf will cache metric_buffer_limit metrics for each output, and will
### flush this buffer on a successful write.
## Telegraf will cache metric_buffer_limit metrics for each output, and will
## flush this buffer on a successful write.
metric_buffer_limit = 10000
### Flush the buffer whenever full, regardless of flush_interval.
## Flush the buffer whenever full, regardless of flush_interval.
flush_buffer_when_full = true
### Collection jitter is used to jitter the collection by a random amount.
### Each plugin will sleep for a random time within jitter before collecting.
### This can be used to avoid many plugins querying things like sysfs at the
### same time, which can have a measurable effect on the system.
## Collection jitter is used to jitter the collection by a random amount.
## Each plugin will sleep for a random time within jitter before collecting.
## This can be used to avoid many plugins querying things like sysfs at the
## same time, which can have a measurable effect on the system.
collection_jitter = "0s"
### Default flushing interval for all outputs. You shouldn't set this below
### interval. Maximum flush_interval will be flush_interval + flush_jitter
## Default flushing interval for all outputs. You shouldn't set this below
## interval. Maximum flush_interval will be flush_interval + flush_jitter
flush_interval = "10s"
### Jitter the flush interval by a random amount. This is primarily to avoid
### large write spikes for users running a large number of telegraf instances.
### ie, a jitter of 5s and interval 10s means flushes will happen every 10-15s
## Jitter the flush interval by a random amount. This is primarily to avoid
## large write spikes for users running a large number of telegraf instances.
## ie, a jitter of 5s and interval 10s means flushes will happen every 10-15s
flush_jitter = "0s"
### Run telegraf in debug mode
## Run telegraf in debug mode
debug = false
### Run telegraf in quiet mode
## Run telegraf in quiet mode
quiet = false
### Override default hostname, if empty use os.Hostname()
## Override default hostname, if empty use os.Hostname()
hostname = ""
Expand Down
6 changes: 3 additions & 3 deletions plugins/inputs/aerospike/aerospike.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ type Aerospike struct {
}

var sampleConfig = `
### Aerospike servers to connect to (with port)
### This plugin will query all namespaces the aerospike
### server has configured and get stats for them.
## Aerospike servers to connect to (with port)
## This plugin will query all namespaces the aerospike
## server has configured and get stats for them.
servers = ["localhost:3000"]
`

Expand Down
2 changes: 1 addition & 1 deletion plugins/inputs/apache/apache.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type Apache struct {
}

var sampleConfig = `
### An array of Apache status URI to gather stats.
## An array of Apache status URI to gather stats.
urls = ["http://localhost/server-status?auto"]
`

Expand Down
10 changes: 5 additions & 5 deletions plugins/inputs/bcache/bcache.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ type Bcache struct {
}

var sampleConfig = `
### Bcache sets path
### If not specified, then default is:
## Bcache sets path
## If not specified, then default is:
bcachePath = "/sys/fs/bcache"
### By default, telegraf gather stats for all bcache devices
### Setting devices will restrict the stats to the specified
### bcache devices.
## By default, telegraf gather stats for all bcache devices
## Setting devices will restrict the stats to the specified
## bcache devices.
bcacheDevs = ["bcache0"]
`

Expand Down
4 changes: 2 additions & 2 deletions plugins/inputs/couchdb/couchdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ func (*CouchDB) Description() string {

func (*CouchDB) SampleConfig() string {
return `
### Works with CouchDB stats endpoints out of the box
### Multiple HOSTs from which to read CouchDB stats:
## Works with CouchDB stats endpoints out of the box
## Multiple HOSTs from which to read CouchDB stats:
hosts = ["http://localhost:8086/_stats"]
`
}
Expand Down
8 changes: 4 additions & 4 deletions plugins/inputs/disque/disque.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ type Disque struct {
}

var sampleConfig = `
### An array of URI to gather stats about. Specify an ip or hostname
### with optional port and password. ie disque://localhost, disque://10.10.3.33:18832,
### 10.0.0.1:10000, etc.
## An array of URI to gather stats about. Specify an ip or hostname
## with optional port and password. ie disque://localhost, disque://10.10.3.33:18832,
## 10.0.0.1:10000, etc.
### If no servers are specified, then localhost is used as the host.
## If no servers are specified, then localhost is used as the host.
servers = ["localhost"]
`

Expand Down
Loading

0 comments on commit 8d2e5f0

Please sign in to comment.