2016-01-08 08:26:33 +08:00
|
|
|
# Graphite Output Plugin
|
|
|
|
|
|
2024-10-29 01:00:22 +08:00
|
|
|
This plugin writes metrics to [Graphite][graphite] via TCP. For details on the
|
|
|
|
|
translation between Telegraf Metrics and Graphite output see the
|
|
|
|
|
[Graphite data format][serializer].
|
2016-04-09 06:04:45 +08:00
|
|
|
|
2024-10-29 01:00:22 +08:00
|
|
|
⭐ Telegraf v0.10.1
|
|
|
|
|
🏷️ datastore
|
|
|
|
|
💻 all
|
2022-04-21 23:45:47 +08:00
|
|
|
|
2024-10-29 01:00:22 +08:00
|
|
|
[graphite]: http://graphite.readthedocs.org/en/latest/index.html
|
|
|
|
|
[serializer]: /plugins/serializers/graphite/README.md
|
2018-05-22 06:59:56 +08:00
|
|
|
|
2022-10-27 03:58:36 +08:00
|
|
|
## Global configuration options <!-- @/docs/includes/plugin_config.md -->
|
|
|
|
|
|
|
|
|
|
In addition to the plugin-specific configuration settings, plugins support
|
|
|
|
|
additional global and plugin configuration settings. These settings are used to
|
|
|
|
|
modify metrics, tags, and field or create aliases and configure ordering, etc.
|
|
|
|
|
See the [CONFIGURATION.md][CONFIGURATION.md] for more details.
|
|
|
|
|
|
2023-01-12 23:55:21 +08:00
|
|
|
[CONFIGURATION.md]: ../../../docs/CONFIGURATION.md#plugins
|
2022-10-27 03:58:36 +08:00
|
|
|
|
2021-11-25 02:47:33 +08:00
|
|
|
## Configuration
|
2016-04-09 06:04:45 +08:00
|
|
|
|
2022-05-25 22:48:59 +08:00
|
|
|
```toml @sample.conf
|
2016-04-09 06:04:45 +08:00
|
|
|
# Configuration for Graphite server to send metrics to
|
|
|
|
|
[[outputs.graphite]]
|
|
|
|
|
## TCP endpoint for your graphite instance.
|
2016-07-14 23:06:00 +08:00
|
|
|
## If multiple endpoints are configured, the output will be load balanced.
|
|
|
|
|
## Only one of the endpoints will be written to with each iteration.
|
2016-04-09 06:04:45 +08:00
|
|
|
servers = ["localhost:2003"]
|
2024-02-06 01:23:34 +08:00
|
|
|
|
|
|
|
|
## Local address to bind when connecting to the server
|
|
|
|
|
## If empty or not set, the local address is automatically chosen.
|
|
|
|
|
# local_address = ""
|
|
|
|
|
|
2016-04-09 06:04:45 +08:00
|
|
|
## Prefix metrics name
|
|
|
|
|
prefix = ""
|
2024-02-06 01:23:34 +08:00
|
|
|
|
2016-04-09 06:04:45 +08:00
|
|
|
## Graphite output template
|
|
|
|
|
## see https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md
|
|
|
|
|
template = "host.tags.measurement.field"
|
2018-05-22 07:39:33 +08:00
|
|
|
|
2023-03-14 18:46:44 +08:00
|
|
|
## Strict sanitization regex
|
|
|
|
|
## This is the default sanitization regex that is used on data passed to the
|
|
|
|
|
## graphite serializer. Users can add additional characters here if required.
|
|
|
|
|
## Be aware that the characters, '/' '@' '*' are always replaced with '_',
|
|
|
|
|
## '..' is replaced with '.', and '\' is removed even if added to the
|
|
|
|
|
## following regex.
|
|
|
|
|
# graphite_strict_sanitize_regex = '[^a-zA-Z0-9-:._=\p{L}]'
|
|
|
|
|
|
2022-04-08 05:55:03 +08:00
|
|
|
## Enable Graphite tags support
|
|
|
|
|
# graphite_tag_support = false
|
|
|
|
|
|
2023-03-14 18:46:44 +08:00
|
|
|
## Applied sanitization mode when graphite tag support is enabled.
|
|
|
|
|
## * strict - uses the regex specified above
|
|
|
|
|
## * compatible - allows for greater number of characters
|
2022-04-08 05:55:03 +08:00
|
|
|
# graphite_tag_sanitize_mode = "strict"
|
|
|
|
|
|
|
|
|
|
## Character for separating metric name and field for Graphite tags
|
|
|
|
|
# graphite_separator = "."
|
|
|
|
|
|
2020-04-01 02:30:21 +08:00
|
|
|
## Graphite templates patterns
|
|
|
|
|
## 1. Template for cpu
|
|
|
|
|
## 2. Template for disk*
|
|
|
|
|
## 3. Default template
|
|
|
|
|
# templates = [
|
|
|
|
|
# "cpu tags.measurement.host.field",
|
|
|
|
|
# "disk* measurement.field",
|
|
|
|
|
# "host.measurement.tags.field"
|
|
|
|
|
#]
|
|
|
|
|
|
2016-04-09 06:04:45 +08:00
|
|
|
## timeout in seconds for the write connection to graphite
|
2023-07-06 03:15:58 +08:00
|
|
|
# timeout = "2s"
|
2017-06-14 04:42:11 +08:00
|
|
|
|
2018-05-05 07:33:23 +08:00
|
|
|
## Optional TLS Config
|
|
|
|
|
# tls_ca = "/etc/telegraf/ca.pem"
|
|
|
|
|
# tls_cert = "/etc/telegraf/cert.pem"
|
|
|
|
|
# tls_key = "/etc/telegraf/key.pem"
|
|
|
|
|
## Use TLS but skip chain & host verification
|
2017-06-14 04:42:11 +08:00
|
|
|
# insecure_skip_verify = false
|
2016-04-09 06:04:45 +08:00
|
|
|
```
|