-
Notifications
You must be signed in to change notification settings - Fork 10
/
telegraf-synology.conf
304 lines (273 loc) · 9.58 KB
/
telegraf-synology.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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
# 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.
# Global tags can be specified here in key="value" format.
[global_tags]
# Configuration for telegraf agent
[agent]
## Default data collection interval for all inputs
interval = "30s"
## Rounds collection interval to 'interval'
## ie, if interval="10s" then always collect on :00, :10, :20, etc.
round_interval = true
## Telegraf will cache metric_buffer_limit metrics for each output, and will
## flush this buffer on a successful write.
metric_buffer_limit = 1000
## Flush the buffer whenever full, regardless of flush_interval.
flush_buffer_when_full = true
## Collection jitter is used to jitter the collection by a random amount.
## Each plugin will sleep for a random time within jitter before collecting.
## This can be used to avoid many plugins querying things like sysfs at the
## same time, which can have a measurable effect on the system.
collection_jitter = "0s"
## Default flushing interval for all outputs. You shouldn't set this below
## interval. Maximum flush_interval will be flush_interval + flush_jitter
flush_interval = "10s"
## Jitter the flush interval by a random amount. This is primarily to avoid
## large write spikes for users running a large number of telegraf instances.
## ie, a jitter of 5s and interval 10s means flushes will happen every 10-15s
flush_jitter = "0s"
## Logging configuration:
## Run telegraf in debug mode
debug = false
## Run telegraf in quiet mode
quiet = false
## Specify the log file name. The empty string means to log to stdout.
logfile = "/var/log/telegraf/telegraf-synology.log"
## Override default hostname, if empty use os.Hostname()
hostname = ""
###############################################################################
# OUTPUTS #
###############################################################################
# Configuration for influxdb server to send metrics to
[[outputs.influxdb]]
# The full HTTP or UDP endpoint URL for your InfluxDB instance.
# Multiple urls can be specified but it is assumed that they are part of the same
# cluster, this means that only ONE of the urls will be written to each interval.
# urls = ["udp://127.0.0.1:8089"] # UDP endpoint example
urls = ["http://X.X.X.X:8086"] # required - enter the IP address of your InfluxDB instance
# The target database for metrics (telegraf will create it if not exists)
database = "Synology" # required
# Precision of writes, valid values are "ns", "us" (or "µs"), "ms", "s", "m", "h".
# note: using second precision greatly helps InfluxDB compression
precision = "s"
## Write timeout (for the InfluxDB client), formatted as a string.
## If not provided, will default to 5s. 0s means no timeout (not recommended).
timeout = "5s"
# username = "telegraf"
# password = "metricsmetricsmetricsmetrics"
# Set the user agent for HTTP POSTs (can be useful for log differentiation)
# user_agent = "telegraf"
# Set UDP payload size, defaults to InfluxDB UDP Client default (512 bytes)
# udp_payload = 512
###############################################################################
# INPUTS #
###############################################################################
##
## Synology
##
[[inputs.snmp]]
# List of agents to poll
agents = [ "X.X.X.X" ] # required - enter the IP address of your Synology device
# Polling interval
interval = "60s"
# Timeout for each SNMP query.
timeout = "10s"
# Number of retries to attempt within timeout.
retries = 3
# SNMP version, UAP only supports v1
version = 2
# SNMP community string.
community = "public"
# The GETBULK max-repetitions parameter
max_repetitions = 30
# Measurement name
name = "snmp.SYNO"
# System name (hostname)
[[inputs.snmp.field]]
is_tag = true
name = "sysName"
oid = "RFC1213-MIB::sysName.0"
# System vendor OID
[[inputs.snmp.field]]
name = "sysObjectID"
oid = "RFC1213-MIB::sysObjectID.0"
# System description
[[inputs.snmp.field]]
name = "sysDescr"
oid = "RFC1213-MIB::sysDescr.0"
# System contact
[[inputs.snmp.field]]
name = "sysContact"
oid = "RFC1213-MIB::sysContact.0"
# System location
[[inputs.snmp.field]]
name = "sysLocation"
oid = "RFC1213-MIB::sysLocation.0"
# System uptime
[[inputs.snmp.field]]
name = "sysUpTime"
oid = "RFC1213-MIB::sysUpTime.0"
# Inet interface
[[inputs.snmp.table]]
oid = "IF-MIB::ifTable"
[[inputs.snmp.table.field]]
is_tag = true
oid = "IF-MIB::ifDescr"
#Syno disk
[[inputs.snmp.table]]
oid = "SYNOLOGY-DISK-MIB::diskTable"
[[inputs.snmp.table.field]]
is_tag = true
oid = "SYNOLOGY-DISK-MIB::diskID"
#Syno raid
[[inputs.snmp.table]]
oid = "SYNOLOGY-RAID-MIB::raidTable"
[[inputs.snmp.table.field]]
is_tag = true
oid = "SYNOLOGY-RAID-MIB::raidName"
#Syno load
[[inputs.snmp.table]]
oid = "UCD-SNMP-MIB::laTable"
[[inputs.snmp.table.field]]
is_tag = true
oid = "UCD-SNMP-MIB::laNames"
# System memTotalSwap
[[inputs.snmp.field]]
name = "memTotalSwap"
oid = "UCD-SNMP-MIB::memTotalSwap.0"
# System memAvailSwap
[[inputs.snmp.field]]
name = "memAvailSwap"
oid = "UCD-SNMP-MIB::memAvailSwap.0"
# System memTotalReal
[[inputs.snmp.field]]
name = "memTotalReal"
oid = "UCD-SNMP-MIB::memTotalReal.0"
# System memAvailReal
[[inputs.snmp.field]]
name = "memAvailReal"
oid = "UCD-SNMP-MIB::memAvailReal.0"
# System memTotalFree
[[inputs.snmp.field]]
name = "memTotalFree"
oid = "UCD-SNMP-MIB::memTotalFree.0"
# System Status
[[inputs.snmp.field]]
name = "systemStatus"
oid = "SYNOLOGY-SYSTEM-MIB::systemStatus.0"
# System temperature
[[inputs.snmp.field]]
name = "temperature"
oid = "SYNOLOGY-SYSTEM-MIB::temperature.0"
# System powerStatus
[[inputs.snmp.field]]
name = "powerStatus"
oid = "SYNOLOGY-SYSTEM-MIB::powerStatus.0"
# System systemFanStatus
[[inputs.snmp.field]]
name = "systemFanStatus"
oid = "SYNOLOGY-SYSTEM-MIB::systemFanStatus.0"
# System cpuFanStatus
[[inputs.snmp.field]]
name = "cpuFanStatus"
oid = "SYNOLOGY-SYSTEM-MIB::cpuFanStatus.0"
# System modelName
[[inputs.snmp.field]]
name = "modelName"
oid = "SYNOLOGY-SYSTEM-MIB::modelName.0"
# System serialNumber
[[inputs.snmp.field]]
name = "serialNumber"
oid = "SYNOLOGY-SYSTEM-MIB::serialNumber.0"
# System version
[[inputs.snmp.field]]
name = "version"
oid = "SYNOLOGY-SYSTEM-MIB::version.0"
# System upgradeAvailable
[[inputs.snmp.field]]
name = "upgradeAvailable"
oid = "SYNOLOGY-SYSTEM-MIB::upgradeAvailable.0"
# System volume
[[inputs.snmp.table]]
oid = "HOST-RESOURCES-MIB::hrStorageTable"
[[inputs.snmp.table.field]]
is_tag = true
oid = "HOST-RESOURCES-MIB::hrStorageDescr"
# System ssCpuUser
[[inputs.snmp.field]]
name = "ssCpuUser"
oid = ".1.3.6.1.4.1.2021.11.9.0"
# System ssCpuSystem
[[inputs.snmp.field]]
name = "ssCpuSystem"
oid = ".1.3.6.1.4.1.2021.11.10.0"
# System ssCpuIdle
[[inputs.snmp.field]]
name = "ssCpuIdle"
oid = ".1.3.6.1.4.1.2021.11.11.0"
# Service users CIFS
[[inputs.snmp.table.field]]
name = "usersCIFS"
oid = "SYNOLOGY-SERVICES-MIB::serviceUsers"
oid_index_suffix = "1"
# Service users AFP
[[inputs.snmp.table.field]]
name = "usersAFP"
oid = "SYNOLOGY-SERVICES-MIB::serviceUsers"
oid_index_suffix = "2"
# Service users NFS
[[inputs.snmp.table.field]]
name = "usersNFS"
oid = "SYNOLOGY-SERVICES-MIB::serviceUsers"
oid_index_suffix = "3"
# Service users FTP
[[inputs.snmp.table.field]]
name = "usersFTP"
oid = "SYNOLOGY-SERVICES-MIB::serviceUsers"
oid_index_suffix = "4"
# Service users SFTP
[[inputs.snmp.table.field]]
name = "usersSFTP"
oid = "SYNOLOGY-SERVICES-MIB::serviceUsers"
oid_index_suffix = "5"
# Service users HTTP
[[inputs.snmp.table.field]]
name = "usersHTTP"
oid = "SYNOLOGY-SERVICES-MIB::serviceUsers"
oid_index_suffix = "6"
# Service users TELNET
[[inputs.snmp.table.field]]
name = "usersTELNET"
oid = "SYNOLOGY-SERVICES-MIB::serviceUsers"
oid_index_suffix = "7"
# Service users SSH
[[inputs.snmp.table.field]]
name = "usersSSH"
oid = "SYNOLOGY-SERVICES-MIB::serviceUsers"
oid_index_suffix = "8"
# Service users OTHER
[[inputs.snmp.table.field]]
name = "usersOTHER"
oid = "SYNOLOGY-SERVICES-MIB::serviceUsers"
oid_index_suffix = "9"
# UPS Status
[[inputs.snmp.table.field]]
name = "upsStatus"
oid = "SYNOLOGY-UPS-MIB::upsInfoStatus"
# UPS Load
[[inputs.snmp.table.field]]
name = "upsLoad"
oid = "SYNOLOGY-UPS-MIB::upsInfoLoadValue"
# UPS Battery Charge
[[inputs.snmp.table.field]]
name = "upsCharge"
oid = "SYNOLOGY-UPS-MIB::upsBatteryChargeValue"
# UPS Battery Charge Warning
[[inputs.snmp.table.field]]
name = "upsWarning"
oid = "SYNOLOGY-UPS-MIB::upsBatteryChargeWarning"