Some alert emails aren't sending

For some weeks now Librenms is not able to send the ‘device down’ alert but is able to send the ‘device recovered alert’

2017-08-22 17:06:12 10.0.20.110 alert Issued recovery for rule ‘Devices up/down’ to transport ‘mail’
2017-08-22 17:00:35 10.0.20.110 error Could not issue critical alert for rule ‘Devices up/down’ to transport ‘mail’ Error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

I have not changed any settings intentionally.

Also maybe related or relevant is that rrd had crashed today when I remoted into the linux computer. Not sure what to do with that either.

====================================

Component Version
LibreNMS 1.30.01-90-ge68082d
DB Schema 204
PHP 7.0.22-0ubuntu0.16.04.1
MySQL 10.0.31-MariaDB-0ubuntu0.16.04.2
RRDTool 1.5.5
SNMP NET-SNMP 5.7.3

====================================

[OK] Database connection successful
[OK] Database schema correct
[WARN] Your install is out of date, last update: Mon, 21 Aug 2017 21:56:13 +0000

The error message is quite specific there, we couldn’t connect to your smtp server. Have you tested the settings you have used to make sure it’s working from the cli?

It seems to be intermittent and only on the ‘down’ email. The send transport button works as does the recovery email. I’ll post back if I have any more details.

can you post the “down” alert rule?

devices up/ down  rule:  %macros.device_down = "1"

This should be stock as I haven’t messed with this yet.It also has a red x under status.

If you know an alert is generated (i.e eventlog says, an alert has been sent via X transport (or words to that effect) then this sounds like your mail setup if I’m honest.

If you don’t see the above message then this is because an alert hasn’t been generated, it’s not been generated simply because the rule hasn’t matched, or it’s not matched at the time the device is polled.

1 Like

I agree that it is probably my mailer (but probably dns according to the PHPMailer troubleshooting - It is however on the same computer as librenms, works intermittently, and this computer is dedicated to librenms, I installed linux and librenms and hid it in a closet).
I am a complete novice but can and do follow documentation. I tried to find the phpmailer script to turn on debugging and couldn’t and kind of gave up. The troubleshooting document starts past where my knowledge of linux ends.

1 Like

Try: https://docs.librenms.org/Alerting/Rules/#testing-alerts