-
Notifications
You must be signed in to change notification settings - Fork 26
/
influxdb-zabbix.conf
151 lines (126 loc) · 4.01 KB
/
influxdb-zabbix.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
### Welcome to the influxdb-zabbix configuration file.
###
### Polling
### Controls polling interval
###
[polling]
## Default polling interval in seconds.
## Minimum is 15.
interval=30
#intervaliferror=60
###
### InfluxDB
### Controls InfluxDB api endpoint
###
[influxdb]
url="http://localhost:8086"
database="zabbix"
## Precision of writes, valid values are ms as formatted in the SQL queries
precision= "ms"
## Connection timeout (in seconds). If not provided, will default to 0 (no timeout)
# timeout=5
## Credentials
# username="influxdb-zabbix"
# password="zabbixmetrics"
###
### Zabbix DB
### Select one provider by commenting [zabbix.postgres] or [zabbix.mysql]
###
[zabbix]
[zabbix.postgres]
## PostgreSQL:
## postgres://[user[:password]]@localhost[/dbname]\
## ?sslmode=[disable|verify-ca|verify-full]
## or a simple string:
## host=localhost user=... password=... sslmode=... dbname=zabbix application_name=influxdb-zabbix
##
address="postgres://zabbix:zabbix123***@192.168.1.101/zabbix?sslmode=disable"
##[zabbix.mysql]
## MariaDB/MySQL
## specify servers via a url matching:
## [username[:password]@][protocol[(address)]]/dbname[?tls=[true|false|skip-verify]]
## see https://github.com/go-sql-driver/mysql#dsn-data-source-name
## e.g.
## db_user:passwd@tcp(127.0.0.1:3306)/zabbix'
##address="zabbix:zabbix@tcp(10.0.0.10:3306)/zabbix"
###
### Zabbix tables
### At least one table has to be active
###
### Controls tables for extracting data
### name (string - mandatory) is the relation name in postgres.
### active (boolean - mandatory) is to activate or not the data extraction.
### startdate (string) is the starting date in yyyy-MM-ddTHH:mm:ss format.
### -- startdate is needed for the first load. After this, value stored in registry file prevails on this one.
### -- example: 2016-10-01T00:00:00
### daysperbatch (int) is the number of days to extractfrom Zabbix backend
### hoursperbatch (int - default 360) is the number of hours to be loaded to InfluxDB
### interval in seconds (int - default 15) is time before each extraction poll.
###
[tables]
[tables.history]
name="history"
active=true
startdate="2017-01-01T00:00:00"
hoursperbatch=720
outputrowsperbatch=50000
interval=15
[tables.history_uint]
name="history_uint"
active=true
startdate="2017-01-01T00:00:00"
hoursperbatch=720
outputrowsperbatch=50000
interval=15
[tables.trends]
name="trends"
active=true
startdate="2017-01-01T00:00:00"
hoursperbatch=720
outputrowsperbatch=50000
interval=15
[tables.trends_uint]
name="trends_uint"
active=true
startdate="2017-01-01T00:00:00"
hoursperbatch=720
outputrowsperbatch=50000
interval=15
###
### Registry file
### Name of the registry file. Per default, it is put in the current working directory.
###
[registry]
# File name path
# Default: /var/lib/influxdb-zabbix/influxdb-zabbix.json
filename="influxdb-zabbix.json"
###
### Logging
### Controls Logging
###
[logging]
# File name path
# Default: /var/log/influxdb-zabbix/influxdb-zabbix.log
filename="influxdb-zabbix.log"
# Either "console", "file", default is "file"
# Use comma to separate multiple modes, e.g. "console, file"
modes="console"
# Buffer length of channel, keep it as it is if you don't know what it is.
bufferlen=10000
# Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
levelconsole="Trace"
# Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Warn"
levelfile="Warn"
# Set formatting to "false" to disable color formatting of console logs
formatting=true
# This enables automated log rotate(switch of following options), default is true
logrotate=true
# Max line number of single file, default is 1000000
maxlines=1000000
# Max size shift of single file, default is 28 means 1 << 28, 256MB
maxsizeshift=28
# Segment log daily, default is true
dailyrotate=true
# Expired days of log file(delete after max days), default is 7
maxdays=7
### End