Skip to content

Commit

Permalink
Update etc/telegraf.conf file
Browse files Browse the repository at this point in the history
  • Loading branch information
sparrc committed Nov 30, 2015
1 parent b705608 commit 3761f00
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 24 deletions.
61 changes: 38 additions & 23 deletions etc/config.sample.toml → etc/telegraf.conf
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
# ie, if interval="10s" then always collect on :00, :10, :20, etc.
round_interval = true

# Default data flushing interval for all outputs
# Default data flushing interval for all outputs. You should not set this below
# interval. Maximum flush_interval will be flush_interval + flush_jitter
flush_interval = "10s"
# Jitter the flush interval by a random range
# ie, a jitter of 5s and interval 10s means flush will happen every 10-15s
flush_jitter = "5s"
# Number of times to retry each data flush
flush_retries = 2
# 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
debug = false
Expand All @@ -53,33 +53,36 @@

# Configuration for influxdb server to send metrics to
[[outputs.influxdb]]
# The full HTTP endpoint URL for your InfluxDB instance
# Multiple urls can be specified for InfluxDB cluster support. Server to
# write to will be randomly chosen each interval.
urls = ["http://localhost:8086"] # required.
# The target database for metrics. This database must already exist
database = "telegraf" # required.
# The full HTTP or UDP endpoint URL for your InfluxDB instance.
# Multiple urls can be specified but it is assumed that they are part of the same
# cluster, this means that only ONE of the urls will be written to each interval.
# urls = ["udp://localhost:8089"] # UDP endpoint example
urls = ["http://localhost:8086"] # required
# The target database for metrics (telegraf will create it if not exists)
database = "telegraf" # required
# Precision of writes, valid values are n, u, ms, s, m, and h
# note: using second precision greatly helps InfluxDB compression
precision = "s"

# Connection timeout (for the connection with InfluxDB), formatted as a string.
# Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
# If not provided, will default to 0 (no timeout)
# timeout = "5s"
# username = "telegraf"
# password = "metricsmetricsmetricsmetrics"

# Set the user agent for the POSTs (can be useful for log differentiation)
# Set the user agent for HTTP POSTs (can be useful for log differentiation)
# user_agent = "telegraf"
# Set UDP payload size, defaults to InfluxDB UDP Client default (512 bytes)
# udp_payload = 512


###############################################################################
# PLUGINS #
###############################################################################

[plugins]

# Read metrics about cpu usage
[cpu]
[[plugins.cpu]]
# Whether to report per-cpu stats or not
percpu = true
# Whether to report total system cpu stats or not
Expand All @@ -88,21 +91,33 @@
drop = ["cpu_time"]

# Read metrics about disk usage by mount point
[disk]
# no configuration
[[plugins.disk]]
# By default, telegraf gather stats for all mountpoints.
# Setting mountpoints will restrict the stats to the specified mountpoints.
# Mountpoints=["/"]

# Read metrics about disk IO by device
[io]
# no configuration
[[plugins.io]]
# By default, telegraf will gather stats for all devices including
# disk partitions.
# Setting devices will restrict the stats to the specified devcies.
# Devices=["sda","sdb"]
# Uncomment the following line if you do not need disk serial numbers.
# SkipSerialNumber = true

# Read metrics about memory usage
[mem]
[[plugins.mem]]
# no configuration

# Read metrics about swap memory usage
[swap]
[[plugins.swap]]
# no configuration

# Read metrics about system load & uptime
[system]
[[plugins.system]]
# no configuration


###############################################################################
# SERVICE PLUGINS #
###############################################################################
2 changes: 1 addition & 1 deletion scripts/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ CONFIG_ROOT_DIR=/etc/opt/telegraf
CONFIG_D_DIR=/etc/opt/telegraf/telegraf.d
LOGROTATE_DIR=/etc/logrotate.d

SAMPLE_CONFIGURATION=etc/config.sample.toml
SAMPLE_CONFIGURATION=etc/telegraf.conf
LOGROTATE_CONFIGURATION=etc/logrotate.d/telegraf
INITD_SCRIPT=scripts/init.sh
SYSTEMD_SCRIPT=scripts/telegraf.service
Expand Down

0 comments on commit 3761f00

Please sign in to comment.