-
Notifications
You must be signed in to change notification settings - Fork 0
/
telegraf.conf
105 lines (83 loc) · 2.91 KB
/
telegraf.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# Global tags can be specified here in key="value" format
[global_tags]
# Add any global tags if needed
# Configuration for telegraf agent
[agent]
interval = "10m"
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 10000
collection_jitter = "0s"
flush_interval = "10s"
flush_jitter = "0s"
precision = ""
debug = false
quiet = false
#loghttp = ""
hostname = "metrics.dm3.network"
omit_hostname = false
# Add HTTP input plugin to poll data from the URL
[[inputs.http]]
urls = ["https://staging.dm3.network/ds/metrics", "https://testing.dm3.network/ds/metrics"]
method = "GET"
data_format = "csv"
csv_header_row_count = 1
csv_timestamp_column = "timestampStart"
csv_timestamp_format = "unix"
## Add this line to create a tag from the URL. Hostname will be extracted later in the pipeline.
tags = { "source" = "${HOST}" }
## Specify the names and types of the fields
csv_column_types = [
"int", # timestampStart
"int", # durationSeconds
"int", # messageCount
"int", # messageSizeBytes
"int" # notificationCount
]
## Name the measurements
name_override = "deliveryServices"
## Set the interval to poll the URL
interval = "10m"
[[processors.regex]]
## Apply regex processor to the "url" field
namepass = ["deliveryServices"]
[[processors.regex.tags]]
key = "url"
pattern = "https?://([^/]+)/.*"
replacement = "${1}"
result_key = "source"
# Output plugin for InfluxDB 2.x
[[outputs.influxdb_v2]]
## The URLs of the InfluxDB cluster nodes.
urls = ["http://influxdb:8086"]
## Token for authentication.
token = "${INFLUX_TOKEN}"
## Organization is the name of the organization you wish to write to.
organization = "dm3"
## Destination bucket to write into.
bucket = "deliveryServices"
## The value of this tag will be used to determine the bucket. If this
## tag is not set the 'bucket' option is used as the default.
# bucket_tag = ""
## If true, the bucket tag will not be added to the metric.
# exclude_bucket_tag = false
## Timeout for HTTP messages.
# timeout = "5s"
## Additional HTTP headers
# http_headers = {"X-Special-Header" = "Special-Value"}
## HTTP Proxy override, if unset values the standard proxy environment
## variables are consulted to determine which proxy, if any, should be used.
# http_proxy = "http://corporate.proxy:3128"
## HTTP User-Agent
# user_agent = "telegraf"
## Content-Encoding for write request body, can be set to "gzip" to
## compress body or "identity" to apply no encoding.
# content_encoding = "gzip"
## Enable or disable uint support for writing uints influxdb 2.0.
# influx_uint_support = false
## Optional TLS Config for use on HTTP connections.
# 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
# insecure_skip_verify = false