Email alert for port down

I’m trying to get an email alert for when a switchport goes down. LibreNMS sees the port go down, shows an alert on the notifications page, but no email is sent. Email transport works, I’ve tested it. I’ve gone through the docs and I’m apparently missing something. If email transport works, why does the event error suggest that “You must provide at least one recipient email address”? Any suggestions?

Here’s the event log for the device:

2017-02-10 13:07:01 System Could not issue recovery for rule ‘Port status up/down’ to transport ‘mail’ Error: You must provide at least one recipient email address.
2017-02-10 13:05:16 Gi4/0/2 ifSpeed: 100000000 -> 1000000000
2017-02-10 13:05:16 Gi4/0/2 ifHighSpeed: 100 -> 1000
2017-02-10 13:01:01 System Could not issue recovery for rule ‘Port status up/down’ to transport ‘mail’ Error: You must provide at least one recipient email address.
2017-02-10 12:55:17 Gi1/0/32 ifOperStatus: down -> up
2017-02-10 12:55:17 Gi1/0/32 ifSpeed: 10000000 -> 100000000
2017-02-10 12:55:17 Gi1/0/32 ifHighSpeed: 10 -> 100
2017-02-10 12:55:17 Gi1/0/32 ifDuplex: unknown -> fullDuplex
2017-02-10 12:45:17 Gi4/0/22 ifSpeed: 10000000 -> 1000000000
2017-02-10 12:45:17 Gi4/0/22 ifHighSpeed: 10 -> 1000
2017-02-10 12:26:01 System Could not issue recovery for rule ‘Port status up/down’ to transport ‘mail’ Error: You must provide at least one recipient email address.
2017-02-10 12:20:15 Gi1/0/32 ifOperStatus: up -> down
2017-02-10 12:20:15 Gi1/0/32 ifSpeed: 100000000 -> 10000000
2017-02-10 12:20:15 Gi1/0/32 ifHighSpeed: 100 -> 10
2017-02-10 12:20:15 Gi1/0/32 ifDuplex: fullDuplex -> unknown
2017-02-10 12:16:01 System Could not issue recovery for rule ‘Port status up/down’ to transport ‘mail’ Error: You must provide at least one recipient email address.

All of a sudden, an email is sent. I changed nothing in the email transport settings…

Eventlog entries
2017-02-10 13:26:01 System Issued critical alert for rule ‘Port status up/down’ to transport 'mail’
2017-02-10 13:25:18 Gi2/0/18 ifOperStatus: down -> up
2017-02-10 13:25:18 Gi2/0/18 ifSpeed: 10000000 -> 1000000000
2017-02-10 13:25:18 Gi2/0/18 ifHighSpeed: 10 -> 1000
2017-02-10 13:25:18 Gi2/0/18 ifDuplex: unknown -> fullDuplex
2017-02-10 13:20:17 Gi1/0/32 ifOperStatus: up -> down
2017-02-10 13:20:17 Gi1/0/32 ifSpeed: 100000000 -> 10000000
2017-02-10 13:20:17 Gi1/0/32 ifHighSpeed: 100 -> 10
2017-02-10 13:20:17 Gi1/0/32 ifDuplex: fullDuplex -> unknown
2017-02-10 13:07:01 System Could not issue recovery for rule ‘Port status up/down’ to transport ‘mail’ Error: You must provide at least one recipient email address.
2017-02-10 13:05:16 Gi4/0/2 ifSpeed: 100000000 -> 1000000000
2017-02-10 13:05:16 Gi4/0/2 ifHighSpeed: 100 -> 1000
2017-02-10 13:01:01 System Could not issue recovery for rule ‘Port status up/down’ to transport ‘mail’ Error: You must provide at least one recipient email address.
2017-02-10 12:55:17 Gi1/0/32 ifOperStatus: down -> up
2017-02-10 12:55:17 Gi1/0/32 ifSpeed: 10000000 -> 100000000
2017-02-10 12:55:17 Gi1/0/32 ifHighSpeed: 10 -> 100
2017-02-10 12:55:17 Gi1/0/32 ifDuplex: unknown -> fullDuplex
2017-02-10 12:45:17 Gi4/0/22 ifSpeed: 10000000 -> 1000000000
2017-02-10 12:45:17 Gi4/0/22 ifHighSpeed: 10 -> 1000
2017-02-10 12:26:01 System Could not issue recovery for rule ‘Port status up/down’ to transport ‘mail’ Error: You must provide at least one recipient email address.
2017-02-10 12:20:15 Gi1/0/32 ifOperStatus: up -> down
2017-02-10 12:20:15 Gi1/0/32 ifSpeed: 100000000 -> 10000000
2017-02-10 12:20:15 Gi1/0/32 ifHighSpeed: 100 -> 10
2017-02-10 12:20:15 Gi1/0/32 ifDuplex: fullDuplex -> unknown
2017-02-10 12:16:01 System Could not issue recovery for rule ‘Port status up/down’ to transport ‘mail’ Error: You must provide at least one recipient email address.

You need to share your settings with us. The error you’ve posted is because we can’t find an email address to send to so this all depends on what settings you have.

Also, an alert will only be sent after the delay and interval times have been reached, an alert in notifications doesn’t mean an alert has been sent.

Thanks, is there a quick way to put together the settings to share?

Also, as noted in my previous posts, mail transport tested ok and worked, and then all of a sudden email alerts started working.

Overall I’m struggling understanding alerting.

Just screen shots is fine.

I’ve never seen mail not work then all of a sudden work, eventlog will tell you what’s going on there.

Understood, I thought it was strange as well. The only change I made was setting additional ports I don’t care about alerting for to “ignore”. No other changes, it just started working all of a sudden.

Try running an alerts capture under edit device -> capture.

pastebin the output and link here.

I am having the same problem. I am able to get device alerts via email, but email alert on port down is not being triggered. Following is the Alert Debug.

https://pastebin.com/w9Z7SLJS

Debug shows it being triggerd

The debug is showing that port down rule is triggered but email is not being generated. For clarity my email transport is configured properly and am receiving alerts for device down but not port down.

Is that device has alerts disabled or in schedule maintenance mode?

No the device is not disabled or in maintenance mode. And it is not one device, we have multiple routers and switches and we are not getting port down alerts for any of these.

Please validate your install and post the output.

https://docs.librenms.org/#Support/Install%20Validation/

Got the following output after running validate. Have fixed the log dir permissions, and have installed php70w-process for posix. Now getting OK. Will test again and let you know about alerts.

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

Component Version
LibreNMS 1.34
DB Schema 217
PHP 7.0.25
MySQL 5.5.56-MariaDB
RRDTool 1.4.8
SNMP NET-SNMP 5.7.2

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

[OK] Database connection successful
[OK] Database schema correct
[WARN] Missing optional PHP extension: posix
[FIX] It is suggested you install php-process or the one that matches your php version
[FAIL] The log folder has improper permissions.
[FIX] chmod ug+rw /opt/librenms/logs

Same result, not getting email alert on port down.

And you are sure the email alert transport is working?

post ./poller.php -h HOSTNAME -d

along with the alert rule.

Your eventlog says no email address is provided. I can see from your settings you are using default contact only. If that’s a valid email then provide the format of what is, i.e [email protected] so we can try and test