xref: /freebsd/sys/contrib/openzfs/cmd/zed/zed.d/zed.rc (revision 716fd348e01c5f2ba125f878a634a753436c2994)
1eda14cbcSMatt Macy##
2*716fd348SMartin Matuska# zed.rc – ZEDLET configuration.
3eda14cbcSMatt Macy##
4e92ffd9bSMartin Matuska# shellcheck disable=SC2034
5eda14cbcSMatt Macy
6eda14cbcSMatt Macy##
7eda14cbcSMatt Macy# Absolute path to the debug output file.
8eda14cbcSMatt Macy#
9eda14cbcSMatt Macy#ZED_DEBUG_LOG="/tmp/zed.debug.log"
10eda14cbcSMatt Macy
11eda14cbcSMatt Macy##
12eda14cbcSMatt Macy# Email address of the zpool administrator for receipt of notifications;
13eda14cbcSMatt Macy#   multiple addresses can be specified if they are delimited by whitespace.
14eda14cbcSMatt Macy# Email will only be sent if ZED_EMAIL_ADDR is defined.
15e92ffd9bSMartin Matuska# Enabled by default; comment to disable.
16eda14cbcSMatt Macy#
17e92ffd9bSMartin MatuskaZED_EMAIL_ADDR="root"
18eda14cbcSMatt Macy
19eda14cbcSMatt Macy##
20eda14cbcSMatt Macy# Name or path of executable responsible for sending notifications via email;
21eda14cbcSMatt Macy#   the mail program must be capable of reading a message body from stdin.
22eda14cbcSMatt Macy# Email will only be sent if ZED_EMAIL_ADDR is defined.
23eda14cbcSMatt Macy#
24eda14cbcSMatt Macy#ZED_EMAIL_PROG="mail"
25eda14cbcSMatt Macy
26eda14cbcSMatt Macy##
27eda14cbcSMatt Macy# Command-line options for ZED_EMAIL_PROG.
28eda14cbcSMatt Macy# The string @ADDRESS@ will be replaced with the recipient email address(es).
29eda14cbcSMatt Macy# The string @SUBJECT@ will be replaced with the notification subject;
30eda14cbcSMatt Macy#   this should be protected with quotes to prevent word-splitting.
31eda14cbcSMatt Macy# Email will only be sent if ZED_EMAIL_ADDR is defined.
32eda14cbcSMatt Macy#
33eda14cbcSMatt Macy#ZED_EMAIL_OPTS="-s '@SUBJECT@' @ADDRESS@"
34eda14cbcSMatt Macy
35eda14cbcSMatt Macy##
36eda14cbcSMatt Macy# Default directory for zed lock files.
37eda14cbcSMatt Macy#
38eda14cbcSMatt Macy#ZED_LOCKDIR="/var/lock"
39eda14cbcSMatt Macy
40eda14cbcSMatt Macy##
41eda14cbcSMatt Macy# Minimum number of seconds between notifications for a similar event.
42eda14cbcSMatt Macy#
43eda14cbcSMatt Macy#ZED_NOTIFY_INTERVAL_SECS=3600
44eda14cbcSMatt Macy
45eda14cbcSMatt Macy##
46eda14cbcSMatt Macy# Notification verbosity.
47eda14cbcSMatt Macy#   If set to 0, suppress notification if the pool is healthy.
48eda14cbcSMatt Macy#   If set to 1, send notification regardless of pool health.
49eda14cbcSMatt Macy#
50eda14cbcSMatt Macy#ZED_NOTIFY_VERBOSE=0
51eda14cbcSMatt Macy
52eda14cbcSMatt Macy##
53eda14cbcSMatt Macy# Send notifications for 'ereport.fs.zfs.data' events.
54eda14cbcSMatt Macy# Disabled by default, any non-empty value will enable the feature.
55eda14cbcSMatt Macy#
56eda14cbcSMatt Macy#ZED_NOTIFY_DATA=
57eda14cbcSMatt Macy
58eda14cbcSMatt Macy##
59eda14cbcSMatt Macy# Pushbullet access token.
60eda14cbcSMatt Macy# This grants full access to your account -- protect it accordingly!
61eda14cbcSMatt Macy#   <https://www.pushbullet.com/get-started>
62eda14cbcSMatt Macy#   <https://www.pushbullet.com/account>
63eda14cbcSMatt Macy# Disabled by default; uncomment to enable.
64eda14cbcSMatt Macy#
65eda14cbcSMatt Macy#ZED_PUSHBULLET_ACCESS_TOKEN=""
66eda14cbcSMatt Macy
67eda14cbcSMatt Macy##
68eda14cbcSMatt Macy# Pushbullet channel tag for push notification feeds that can be subscribed to.
69eda14cbcSMatt Macy#   <https://www.pushbullet.com/my-channel>
70eda14cbcSMatt Macy# If not defined, push notifications will instead be sent to all devices
71eda14cbcSMatt Macy#   associated with the account specified by the access token.
72eda14cbcSMatt Macy# Disabled by default; uncomment to enable.
73eda14cbcSMatt Macy#
74eda14cbcSMatt Macy#ZED_PUSHBULLET_CHANNEL_TAG=""
75eda14cbcSMatt Macy
76eda14cbcSMatt Macy##
77eda14cbcSMatt Macy# Slack Webhook URL.
78eda14cbcSMatt Macy# This allows posting to the given channel and includes an access token.
79eda14cbcSMatt Macy#   <https://api.slack.com/incoming-webhooks>
80eda14cbcSMatt Macy# Disabled by default; uncomment to enable.
81eda14cbcSMatt Macy#
82eda14cbcSMatt Macy#ZED_SLACK_WEBHOOK_URL=""
83eda14cbcSMatt Macy
84eda14cbcSMatt Macy##
8516038816SMartin Matuska# Pushover token.
8616038816SMartin Matuska# This defines the application from which the notification will be sent.
8716038816SMartin Matuska#   <https://pushover.net/api#registration>
8816038816SMartin Matuska# Disabled by default; uncomment to enable.
8916038816SMartin Matuska# ZED_PUSHOVER_USER, below, must also be configured.
9016038816SMartin Matuska#
9116038816SMartin Matuska#ZED_PUSHOVER_TOKEN=""
9216038816SMartin Matuska
9316038816SMartin Matuska##
9416038816SMartin Matuska# Pushover user key.
9516038816SMartin Matuska# This defines which user or group will receive Pushover notifications.
9616038816SMartin Matuska#  <https://pushover.net/api#identifiers>
9716038816SMartin Matuska# Disabled by default; uncomment to enable.
9816038816SMartin Matuska# ZED_PUSHOVER_TOKEN, above, must also be configured.
9916038816SMartin Matuska#ZED_PUSHOVER_USER=""
10016038816SMartin Matuska
10116038816SMartin Matuska##
102eda14cbcSMatt Macy# Default directory for zed state files.
103eda14cbcSMatt Macy#
104eda14cbcSMatt Macy#ZED_RUNDIR="/var/run"
105eda14cbcSMatt Macy
106eda14cbcSMatt Macy##
107eda14cbcSMatt Macy# Turn on/off enclosure LEDs when drives get DEGRADED/FAULTED.  This works for
10881b22a98SMartin Matuska# device mapper and multipath devices as well.  This works with JBOD enclosures
10981b22a98SMartin Matuska# and NVMe PCI drives (assuming they're supported by Linux in sysfs).
110eda14cbcSMatt Macy#
111eda14cbcSMatt MacyZED_USE_ENCLOSURE_LEDS=1
112eda14cbcSMatt Macy
113eda14cbcSMatt Macy##
114eda14cbcSMatt Macy# Run a scrub after every resilver
115eda14cbcSMatt Macy# Disabled by default, 1 to enable and 0 to disable.
116eda14cbcSMatt Macy#ZED_SCRUB_AFTER_RESILVER=0
117eda14cbcSMatt Macy
118eda14cbcSMatt Macy##
119eda14cbcSMatt Macy# The syslog priority (e.g., specified as a "facility.level" pair).
120eda14cbcSMatt Macy#
121eda14cbcSMatt Macy#ZED_SYSLOG_PRIORITY="daemon.notice"
122eda14cbcSMatt Macy
123eda14cbcSMatt Macy##
124eda14cbcSMatt Macy# The syslog tag for marking zed events.
125eda14cbcSMatt Macy#
126eda14cbcSMatt Macy#ZED_SYSLOG_TAG="zed"
127eda14cbcSMatt Macy
128eda14cbcSMatt Macy##
129eda14cbcSMatt Macy# Which set of event subclasses to log
130eda14cbcSMatt Macy# By default, events from all subclasses are logged.
131eda14cbcSMatt Macy# If ZED_SYSLOG_SUBCLASS_INCLUDE is set, only subclasses
132eda14cbcSMatt Macy# matching the pattern are logged. Use the pipe symbol (|)
133eda14cbcSMatt Macy# or shell wildcards (*, ?) to match multiple subclasses.
134eda14cbcSMatt Macy# Otherwise, if ZED_SYSLOG_SUBCLASS_EXCLUDE is set, the
135eda14cbcSMatt Macy# matching subclasses are excluded from logging.
136eda14cbcSMatt Macy#ZED_SYSLOG_SUBCLASS_INCLUDE="checksum|scrub_*|vdev.*"
1377877fdebSMatt MacyZED_SYSLOG_SUBCLASS_EXCLUDE="history_event"
1387877fdebSMatt Macy
1397877fdebSMatt Macy##
1407877fdebSMatt Macy# Use GUIDs instead of names when logging pool and vdevs
1417877fdebSMatt Macy# Disabled by default, 1 to enable and 0 to disable.
1427877fdebSMatt Macy#ZED_SYSLOG_DISPLAY_GUIDS=1
143eda14cbcSMatt Macy
144