From 2a6ff168195b764e36f9c07084c98db8d9ea62c3 Mon Sep 17 00:00:00 2001 From: Cameron Sparr Date: Mon, 22 Feb 2016 14:43:00 -0700 Subject: [PATCH] Fix up config panic points for naoina/toml support closes #736 --- CHANGELOG.md | 1 + internal/config/config.go | 21 +++++++++------------ plugins/inputs/system/disk.go | 12 ++++++------ 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4524b9817..0f5b72e28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - [#727](https://github.com/influxdata/telegraf/pull/727): riak input, thanks @jcoene! - [#694](https://github.com/influxdata/telegraf/pull/694): DNS Query input, thanks @mjasion! - [#724](https://github.com/influxdata/telegraf/pull/724): username matching for procstat input, thanks @zorel! +- [#736](https://github.com/influxdata/telegraf/pull/736): Ignore dummy filesystems from disk plugin. Thanks @PierreF! ### Bugfixes - [#701](https://github.com/influxdata/telegraf/pull/701): output write count shouldnt print in quiet mode. diff --git a/internal/config/config.go b/internal/config/config.go index 09f878f50..b5b73e06e 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -185,25 +185,22 @@ var header = `# Telegraf Configuration hostname = "" -############################################################################### -# OUTPUTS # -############################################################################### +# +# OUTPUTS: +# ` var pluginHeader = ` - -############################################################################### -# INPUTS # -############################################################################### - +# +# INPUTS: +# ` var serviceInputHeader = ` - -############################################################################### -# SERVICE INPUTS # -############################################################################### +# +# SERVICE INPUTS: +# ` // PrintSampleConfig prints the sample config diff --git a/plugins/inputs/system/disk.go b/plugins/inputs/system/disk.go index f93558de2..5784a7322 100644 --- a/plugins/inputs/system/disk.go +++ b/plugins/inputs/system/disk.go @@ -26,8 +26,8 @@ var diskSampleConfig = ` ## Setting mountpoints will restrict the stats to the specified mountpoints. # mount_points = ["/"] - # Ignore some mountpoints by filesystem type. For example (dev)tmpfs (usually - # present on /run, /var/run, /dev/shm or /dev). + ## Ignore some mountpoints by filesystem type. For example (dev)tmpfs (usually + ## present on /run, /var/run, /dev/shm or /dev). ignore_fs = ["tmpfs", "devtmpfs"] ` @@ -88,11 +88,11 @@ func (_ *DiskIOStats) Description() string { } var diskIoSampleConfig = ` - # By default, telegraf will gather stats for all devices including - # disk partitions. - # Setting devices will restrict the stats to the specified devices. + ## By default, telegraf will gather stats for all devices including + ## disk partitions. + ## Setting devices will restrict the stats to the specified devices. # devices = ["sda", "sdb"] - # Uncomment the following line if you do not need disk serial numbers. + ## Uncomment the following line if you do not need disk serial numbers. # skip_serial_number = true `