-
Notifications
You must be signed in to change notification settings - Fork 0
/
telegraf.conf
43 lines (37 loc) · 1.65 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
# Configuration for influxdb server to send metrics to
[[outputs.postgresql]]
## All connection parameters are optional. Also supported are PG environment vars
## e.g. PGPASSWORD, PGHOST, PGUSER, PGDATABASE
## all supported vars here: https://www.postgresql.org/docs/current/libpq-envars.html
##
## Without the dbname parameter, the driver will default to a database
## with the same name as the user. This dbname is just for instantiating a
## connection with the server and doesn't restrict the databases we are trying
## to grab metrics for.
##
connection = "host=db"
## Store tags as foreign keys in the metrics table. Default is false.
tags_as_foreignkeys = true
## Template to use for generating tables
## Available Variables:
## {TABLE} - tablename as identifier
## {TABLELITERAL} - tablename as string literal
## {COLUMNS} - column definitions
## {KEY_COLUMNS} - comma-separated list of key columns (time + tags)
## Example for timescaledb
table_template="CREATE TABLE IF NOT EXISTS {TABLE}({COLUMNS}); SELECT create_hypertable({TABLELITERAL},'time',chunk_time_interval := '1 week
'::interval,if_not_exists := true);"
## Schema to create the tables into
# schema = "public"
## Use jsonb datatype for tags
tags_as_jsonb = true
## Use jsonb datatype for fields
# fields_as_jsonb = false
# # Generic socket listener capable of handling multiple socket types.
[[inputs.socket_listener]]
service_address = "udp://127.0.0.1:8094"
data_format = "influx"
[[inputs.prometheus]]
## An array of urls to scrape metrics from.
urls = ["http://heplify-server:9096/metrics"]
namedrop = ["go*","process*","promhttp*"]