How to setup Notifications properly

HawHoo

New Member
Apr 1, 2024
16
2
3
Hi,
I am trying to confirm emial notifications/ Alerting is setup properly.
I can't find the answers I am looking for ...

  • Email is confirmed working / test button send a test emial
  • Setup 2 simple Notification Matchers for "Error" and "Warning"
  • removed a "test ZFS drive" and the journal Log shows:
    Apr 29 15:21:33 pve-03 pvestatd[1231]: zfs error: cannot open 'DeleteMeUsbZFSAlertingTest': pool I/O is currently suspended
  • yet the emial notification is not triggering
What am I missing? I read somewhere that the notifications rely on syslog ?

Do I need to install syslog to get notifications?

Thanks for your help ...
 
BTW is there a better way to test notifications than creating and disconnecting a zfs test drive?
 
I am also very interested in the answer. I have exactly the same question Notifications via the test button arrive successfully, but no message regarding ZFS. I also tried to trigger ZFS notifications by removing a drive from the raid. Even changing the mail address in /etc/zfs/zed.d/zed.rc and setting the verbose level to 1 did not improve the situation.
 
Just a guess, not verified: you may configure "Notification Targets" to send mail via SMTP to -let's say- mypve@proton.me. You can successfully test it. Then the Proxmox middleware can send you mails.

Suspicion: the underlying Linux OS does not see this configuration and does not use it. It uses Postfix. You can find several hints on how to configure Debian to send email using this classic mechanism at several places. Only if you are successfully able to run ~# echo "testmail 1" | mail mypve@proton.me tools like logwatch, unattended-upgrade, zed and a bazillion other Linux tools can send you an email.

Take a look into cat /var/log/mail.{err,info,warn}, perhaps you'll find errors there.

PS: most unconfigured tools try to send to "root@localhost". Make sure to establish a "forward" to your external email...

Again: this statement is not verified - but Postfix works fine :cool:
 
  • Like
Reactions: HawHoo
@UdoB Vielen Dank fuer Deine Hilfe.... Matthias
  1. So I did get a mail alert for a failed replication yesterday
    it appears the replication engine can work with the non postfix setup.
  2. echo "testmail 1" | mail mypve@proton.me --> no email received
  3. There are no logs in /var/log/m*
Solution:
A) You need to have postfix configured, excellent tutorial here:
https://forum.proxmox.com/threads/get-postfix-to-send-notifications-email-externally.59940/

B) You need to also have Syslog installed and rsyslog must be running.
 
  • Like
Reactions: UdoB

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!