KB450400 – Enabling ZFS Email Notifications on Ubuntu 20.04LTS

Last modified: July 16, 2021
You are here:

KB450400 – Enabling ZFS Email Notifications on Ubuntu 20.04LTS

Scope/Description:

This article will walk through the process to enable ZFS email notifications on a CentOS system.

Prerequisites:

  • ZFS installed
  • ZFS watcher installed

Steps:

  • Open zfswatcher.conf for editing
[root@centos~]# vim /etc/zfs/zfswatcher.conf
  • Turn on email notifications
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; 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
  • Specify the email server to send the alerts
; The SMTP server name or IP address followed by a colon and a port number:
;server = localhost:587
;server = 192.0.2.1:25
server = smtp.example.com:587
  • Specify username/password. If the email server requires a username/password
; The username and password if the SMTP server requires them for
; authentication:
username = exampleuser
password = supersecret
  • Enter address to send/receive email alerts
; "From" address for notification messages:
from = zfswatcher@example.com
;
; "To" address(es) for notification messages (several addresses can
; be listed, separated by spaces):
to = root@example.net sysadm@example.org
  • Restart zfswatcher service.
[root@centos~]# systemctl restart zfswatcher

Verification:

  • Offline a drive in the ZFS array and verify that the email has been sent.
Was this article helpful?
Dislike 0
Views: 17
Unboxing Racking Storage Drives Cable Setup Power UPS Sizing Remote Access