summaryrefslogtreecommitdiffstats
path: root/server/setup/05-service-settings/etc/zfs/zfswatcher.conf
blob: aa6fcfcf7e52fb62000beb04e15c83319a56c4ef (plain)
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
;
; zfswatcher.conf
;
; Copyright © 2012-2013 Damicon Kraa Oy
;
; This file is part of zfswatcher.
;
; Zfswatcher is free software: you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation, either version 3 of the License, or
; (at your option) any later version.
;
; Zfswatcher is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with zfswatcher. If not, see <http://www.gnu.org/licenses/>.
;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; The general syntax of this file is the same as Git configuration file
; syntax which is documented in git-config(1). It is very similar to the
; traditional INI file syntax.
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; The "main" section is used to define the core settings of zfswatcher.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[main]
;
; The interval for running "zpool status" command, specified in seconds:
zpoolstatusrefresh = 5
;
; The command for getting zpool status output:
zpoolstatuscmd = "/sbin/zpool status"
;
; The interval for running "zfs list" command, specified in seconds:
zfslistrefresh = 30
;
; The command for getting "zfs list" output for overall pool space usage:
zfslistcmd = "/sbin/zfs list -H -o name,avail,used,usedsnap,usedds,usedrefreserv,usedchild,refer,mountpoint -d 0"
;
; The command for getting "zfs list" output for pool specific space usage
; (this is only used by the web interface):
zfslistusagecmd = "/sbin/zfs list -H -o name,avail,used,usedsnap,usedds,usedrefreserv,usedchild,refer,mountpoint -r -t all"
;
; Location where we write a pid file if desired:
pidfile = /var/run/zfswatcher.pid

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; The "severity" section maps various ZFS states to syslog severity levels.
;
; The following severity levels are supported (listed with decreasing
; importance): emerg, alert, crit, err, warning, notice, info, debug
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[severity]
;
; A map which defines severity levels based on ZFS overall pool 
; state information:
poolstatemap = OFFLINE:info REMOVED:crit FAULTED:alert SPLIT:info \
	UNAVAIL:alert DEGRADED:crit ONLINE:info UNKNOWN:alert
;
; The severity of notifications about added ZFS pools:
pooladded = notice
;
; The severity of notifications about removed ZFS pools:
poolremoved = notice
;
; The severity of notifications about ZFS pool "status" text changes:
poolstatuschanged = err
;
; The severity of notifications about cleared ZFS pool "status" text:
poolstatuscleared = notice
;
; The severity of notifications about changed ZFS pool "errors" text:
poolerrorschanged = err
;
; A map of severity levels based on ZFS component device states:
devstatemap = OFFLINE:info REMOVED:err FAULTED:err SPLIT:info UNAVAIL:err \
	DEGRADED:err ONLINE:info UNKNOWN:err INUSE:err AVAIL:info
;
; The severity of notifications about added pool devices:
devadded = notice
;
; The severity of notifications about removed pool devices:
devremoved = notice
;
; The severity of notifications about pool device read errors:
devreaderrorsincreased = err
;
; The severity of notifications about pool device write errors:
devwriteerrorsincreased = err
;
; The severity of notifications about pool device checksum errors:
devcksumerrorsincreased = err
;
; The severity of notifications about pool device "additional info" text
; changes (for example "(resilvering)"):
devadditionalinfochanged = notice
;
; The severity of notifications about cleared pool device "additional info"
; text:
devadditionalinfocleared = notice
;
; Notifications when disk usage reaches defined levels. Several levels
; can be defined. Disable disk space checking by commenting. This
; setting also affects the web interface used space bar colours together
; with www.usedstatecssclassmap.
usedspace = 80%:info 85%:notice 90%:err 95%:crit

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; The "leds" section contains settings related to enclosure LED control.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[leds]
;
; Whether the enclosure LED management should be enabled or not:
enable = false
;
; The external "ledctl" command (distributed as a part of "ledmon" package):
ledctlcmd = /usr/sbin/ledctl
;
; The following maps device states to IBPI blinking patterns.
; Possible pattern names are: normal, locate, fail, rebuild, rebuild_p,
; 	rebuild_s, pfa, hotspare, critical_array, failed_array
; (Supported patterns depends on the used enclosure.)
devstatemap = OFFLINE:fail REMOVED:fail FAULTED:fail SPLIT:normal \
	UNAVAIL:fail DEGRADED:fail ONLINE:normal UNKNOWN:fail INUSE:normal \
	AVAIL:normal

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; The "logfile" section(s) define file based logging destinations.
; Multiple "logfile" sections with different parameters may be defined by
; using different profile names (in quotes after the section name).
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[logfile "main"]
;
; Whether this logging destination should be enabled or not:
enable = true
;
; Which message severity levels to include in this logging destination:
level = debug
;
; The path name of the log file:
file = /var/log/zfswatcher.log

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; The "syslog" section(s) define syslog(3) based logging destinations.
; Multiple "syslog" sections with different parameters may be defined by
; using different profile names (in quotes after the section name).
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[syslog "main"]
;
; Whether this logging destination should be enabled or not:
enable = false
;
; Which message severity levels to include in this logging destination:
level = info
;
; Which syslog facility code to use for this logging destination:
; (Facility codes: kern, user, mail, daemon, auth, syslog, lpr, news, uucp,
; cron, authpriv, ftp, local0, local1, local2, local3, local4, local5,
; local6, local7)
facility = daemon
;
; The syslog output socket destination. This may be a local UNIX socket
; such as "/dev/log" or a remote UDP socket listed with IP address or
; DNS host name followed by a colon and a port number.
;server = 192.0.2.1:514
;server = localhost:514
server = /dev/log

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; The "email" section(s) define SMTP email based logging destinations.
; Multiple "email" sections with different parameters may be defined by
; using different profile names (in quotes after the section name).
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[email "main"]
;
; Whether this logging destination should be enabled or not:
enable = true
;
; Which message severity levels to include in this logging destination:
; level = err
level = info
;
; The SMTP server name or IP address followed by a column and a port number:
;server = localhost:587
;server = 192.0.2.1:25
;server = smtp.example.com:587
server = localhost:25
;
; The username and password if the SMTP server requires them for
; authentication:
;username = exampleuser
;password = supersecret
;
; "From" address for notification messages:
from = root@jogamp.org
;
; "To" address(es) for notification messages (several addresses can
; be listed, separated by spaces):
; to = root@example.net sysadm@example.org
to = root@jogamp.org
;
; The "Subject" of notification messages (the severity level is
; automatically appended at the end):
subject = "jogamp.org: zfs notification"
;
; The time to wait (in seconds) between consecutive e-mail messages
; (prevents flooding too many e-mails if there are many errors within
; a short period of time):
throttle = 60

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; The "www" section defines settings for the internal web interface.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[www]
;
; Whether the web server should be enabled or not:
enable = false
;
; Which message severity levels to include in the web interface log display:
level = debug
;
; The size of the web interface log buffer (how many last messages to
; keep available through the web interface):
logbuffer = 1000
;
; The web server listening address (IP address followed by a colon and
; a port number, often the IP address is omitted and in that case
; the server listens on all interfaces):
bind = :80
;
; Enable the following to use a TLS listener:
;certfile = /some/path/cert.pem
;keyfile = /some/path/key.pem
;
; The directory which contains the web server templates:
templatedir = /usr/share/zfswatcher/www/templates
;
; The directory which contains static resources for the web interface
; (such as CSS, JS and image files which are referred from the templates):
resourcedir = /usr/share/zfswatcher/www/resources
;
;
; The following maps log severity levels to CSS class names for the
; web interface (for highlighting important messages, the available class
; names depend on the CSS template):
severitycssclassmap = emerg:error alert:error crit:error err:warning \
	warning:warning notice:info info: debug:
;
; The following maps pool states to CSS class names for the web interface:
poolstatecssclassmap = OFFLINE:text-warning REMOVED:text-error \
	FAULTED:text-error SPLIT:text-info UNAVAIL:text-error \
	DEGRADED:text-warning ONLINE:text-success UNKNOWN:text-error
;
; The following maps device states to CSS class names for the web interface:
devstatecssclassmap = OFFLINE:text-warning REMOVED:text-error \
	FAULTED:text-error SPLIT:text-info UNAVAIL:text-error \
	DEGRADED:text-warning ONLINE:text-success UNKNOWN:text-error \
	INUSE:text-warning AVAIL:text-muted
;
; The following maps pool usage severities to CSS classes for the dashboard
; used space bar display. The pseudo severity "none" can be used to specify
; the class when none of the usage levels specified in "usedspace" has
; been reached.
usedstatecssclassmap = none:bar-info info:bar-info notice:bar-warning \
	err:bar-warning crit:bar-danger

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; The "wwwuser" sections define usernames and passwords for the web
; interface. The username is listed in quotes after the section name.
; Several users can be specified by repeating the section with different
; user names.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[wwwuser "root"]
;
; Whether this user is enabled or not:
enable = false
;
; Password in MD5 crypt (salted hash) format (the hash can be produced 
; with "mkpasswd -m md5" or "zfswatcher -P"):
;password = $1$fNF5/E3q$TEYvY1AQae/7rzHQ5fVgD1   ; toor

[wwwuser "otheruser"]
enable = false
;password = $1$dlPL2MqE$oQmn16q49SqdmhenQuNgs1	; hello

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; The end.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;