-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: added test for the new skip failed outputs config
- Loading branch information
Showing
3 changed files
with
159 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# Telegraf configuration | ||
|
||
# Telegraf is entirely plugin driven. All metrics are gathered from the | ||
# declared inputs. | ||
|
||
# Even if a plugin has no configuration, it must be declared in here | ||
# to be active. Declaring a plugin means just specifying the name | ||
# as a section with no variables. To deactivate a plugin, comment | ||
# out the name and any variables. | ||
|
||
# Use 'telegraf -config telegraf.toml -test' to see what metrics a config | ||
# file would generate. | ||
|
||
# One rule that plugins conform to is wherever a connection string | ||
# can be passed, the values '' and 'localhost' are treated specially. | ||
# They indicate to the plugin to use their own builtin configuration to | ||
# connect to the local system. | ||
|
||
# NOTE: The configuration has a few required parameters. They are marked | ||
# with 'required'. Be sure to edit those to make this configuration work. | ||
|
||
# Tags can also be specified via a normal map, but only one form at a time: | ||
[global_tags] | ||
dc = "us-east-1" | ||
|
||
# Configuration for telegraf agent | ||
[agent] | ||
# Default data collection interval for all plugins | ||
interval = "10s" | ||
|
||
# run telegraf in debug mode | ||
debug = false | ||
|
||
# Override default hostname, if empty use os.Hostname() | ||
hostname = "" | ||
|
||
skip_failed_outputs = true | ||
|
||
|
||
############################################################################### | ||
# OUTPUTS # | ||
############################################################################### | ||
|
||
# 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:808"] # required. | ||
|
||
# The target database for metrics. This database must already exist | ||
database = "telegraf" # required. | ||
|
||
# Configuration for the Kafka server to send metrics to | ||
[[outputs.kafka]] | ||
# URLs of kafka brokers | ||
brokers = ["localhost:9099"] | ||
# Kafka topic for producer messages | ||
topic = "telegraf" | ||
# Telegraf tag to use as a routing key | ||
# ie, if this tag exists, its value will be used as the routing key | ||
routing_tag = "host" | ||
|
||
|
||
############################################################################### | ||
# PLUGINS # | ||
############################################################################### | ||
|
||
# Read Apache status information (mod_status) | ||
[[inputs.apache]] | ||
# An array of Apache status URI to gather stats. | ||
urls = ["http://localhost/server-status?auto"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# Telegraf configuration | ||
|
||
# Telegraf is entirely plugin driven. All metrics are gathered from the | ||
# declared inputs. | ||
|
||
# Even if a plugin has no configuration, it must be declared in here | ||
# to be active. Declaring a plugin means just specifying the name | ||
# as a section with no variables. To deactivate a plugin, comment | ||
# out the name and any variables. | ||
|
||
# Use 'telegraf -config telegraf.toml -test' to see what metrics a config | ||
# file would generate. | ||
|
||
# One rule that plugins conform to is wherever a connection string | ||
# can be passed, the values '' and 'localhost' are treated specially. | ||
# They indicate to the plugin to use their own builtin configuration to | ||
# connect to the local system. | ||
|
||
# NOTE: The configuration has a few required parameters. They are marked | ||
# with 'required'. Be sure to edit those to make this configuration work. | ||
|
||
# Tags can also be specified via a normal map, but only one form at a time: | ||
[global_tags] | ||
dc = "us-east-1" | ||
|
||
# Configuration for telegraf agent | ||
[agent] | ||
# Default data collection interval for all plugins | ||
interval = "10s" | ||
|
||
# run telegraf in debug mode | ||
debug = false | ||
|
||
# Override default hostname, if empty use os.Hostname() | ||
hostname = "" | ||
|
||
skip_failed_outputs = true | ||
|
||
|
||
############################################################################### | ||
# OUTPUTS # | ||
############################################################################### | ||
|
||
# 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. | ||
|
||
# Configuration for the Kafka server to send metrics to | ||
[[outputs.kafka]] | ||
# URLs of kafka brokers | ||
brokers = ["localhost:9099"] | ||
# Kafka topic for producer messages | ||
topic = "telegraf" | ||
# Telegraf tag to use as a routing key | ||
# ie, if this tag exists, its value will be used as the routing key | ||
routing_tag = "host" | ||
|
||
|
||
############################################################################### | ||
# PLUGINS # | ||
############################################################################### | ||
|
||
# Read Apache status information (mod_status) | ||
[[inputs.apache]] | ||
# An array of Apache status URI to gather stats. | ||
urls = ["http://localhost/server-status?auto"] |