2022-02-24 05:48:11 +08:00
|
|
|
# Telegraf Configuration
|
|
|
|
|
#
|
|
|
|
|
# Telegraf is entirely plugin driven. All metrics are gathered from the
|
|
|
|
|
# declared inputs, and sent to the declared outputs.
|
|
|
|
|
#
|
|
|
|
|
# Plugins must be declared in here to be active.
|
|
|
|
|
# To deactivate a plugin, comment out the name and any variables.
|
|
|
|
|
#
|
|
|
|
|
# Use 'telegraf -config telegraf.conf -test' to see what metrics a config
|
|
|
|
|
# file would generate.
|
|
|
|
|
#
|
|
|
|
|
# Environment variables can be used anywhere in this config file, simply surround
|
2023-06-16 02:11:38 +08:00
|
|
|
# them with $${}. For strings the variable must be within quotes (ie, "$${STR_VAR}"),
|
|
|
|
|
# for numbers and booleans they should be plain (ie, $${INT_VAR}, $${BOOL_VAR})
|
2022-02-24 05:48:11 +08:00
|
|
|
|
2016-04-02 03:53:34 +08:00
|
|
|
[[inputs.memcached]]
|
2023-05-24 15:47:25 +08:00
|
|
|
# this comment line will be ignored by the parser
|
2023-06-16 02:11:38 +08:00
|
|
|
servers = ["$MY_TEST_SERVER"]
|
|
|
|
|
namepass = ["metricname1", "ip_$${MY_TEST_SERVER}_name"] # this comment will be ignored as well
|
2016-04-02 03:53:34 +08:00
|
|
|
namedrop = ["metricname2"]
|
|
|
|
|
fieldpass = ["some", "strings"]
|
|
|
|
|
fielddrop = ["other", "stuff"]
|
|
|
|
|
interval = "$TEST_INTERVAL"
|
2023-05-24 15:47:25 +08:00
|
|
|
##### this input is provided to test multiline strings
|
|
|
|
|
command = """
|
2023-06-16 02:11:38 +08:00
|
|
|
Raw command which may or may not contain # or ${var} in it
|
2023-05-24 15:47:25 +08:00
|
|
|
# is unique""" # Multiline comment black starting with #
|
2016-04-02 03:53:34 +08:00
|
|
|
[inputs.memcached.tagpass]
|
2023-06-16 02:11:38 +08:00
|
|
|
goodtag = ["mytag", """tagwith#value""",
|
2023-05-24 15:47:25 +08:00
|
|
|
# comment in between array items
|
|
|
|
|
# should ignore "quotes" in comments
|
|
|
|
|
'''TagWithMultilineSyntax''', ## ignore this comment
|
|
|
|
|
] # hastag
|
2016-04-02 03:53:34 +08:00
|
|
|
[inputs.memcached.tagdrop]
|
|
|
|
|
badtag = ["othertag"]
|