Alert Transports failing to generate alerts

I’ve migrated my installation to the new Alert Transports, but I’m having problems with Alerts not being generated automatically when rules are triggered.

e.g. I have a rule to generate an alert to flag a device which has reloaded:

macros.device = 1 AND devices.uptime < 480 AND macros.device_up = 1

If run this manually via the test-alert.php script it generates alerts as designed, and the “Issued critical alert” message appears in that device’s event log.

./test-alert.php -r 34 -h shb-poe-21.domain.com
Issuing Alert-UID #111706/1: mail => OK; pushover => OK; slack => OK;

Recent Events:

|2018-11-12 13:32:02||Issued critical alert for rule 'Device Reloaded' to transport 'slack'|
|2018-11-12 13:32:01||Issued critical alert for rule 'Device Reloaded' to transport 'mail'|
|2018-11-12 13:32:01||Issued critical alert for rule 'Device Reloaded' to transport 'pushover'|

If however I initiate a reload of the monitored device, while the Alert appears on the LibreNMS GUI Alerts page, no alerts are issued, and nothing appears in the device’s event log.

All the configured Alert Transports are Default and as described above everything works as expected when manually run via the test-alert.php script.

lnms_alert_transports_20181112

And just to confirm, all alerts were generated as expected when using the legacy transports.

Any ideas?

Thanks

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

Component Version
LibreNMS 1.45
DB Schema 270
PHP 7.0.32
MySQL 5.5.60-MariaDB
RRDTool 1.4.8
SNMP NET-SNMP 5.7.2
====================================

just because an alert shows as active in the webui doesn’t mean that it will send an alert via a transport. It only does that when interval and delay are met.

Check eventlog after an alert shows, if it doesn’t say it’s tried to send one then your alert hasn’t met the conditions it needs. If it does show, I’d say you’ve got issues with your transports.

Thanks for the assistance, but I was looking in the wrong place…

I deleted the new Alert Transports and went back to the legacy ones and while alerts were appearing in the GUI still nothing was being sent via the alert transports. after a dig about the system I found the root of the problem: running alerts.php at the command line generated an error:

Start: Tue, 13 Nov 2018 11:01:54 +0000
ClearStaleAlerts():
RunFollowUp():
RunAlerts():
Issuing Alert-UID #110970/0:
In alerts.inc.php(403) : eval()'d code line 13:

  Parse error: syntax error, unexpected ''ifSpeed\'] >= 1000000000 ) { ' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING)

At that point I realised that one of the Alert Templates hadn’t been converted and was jamming up the alerts process. Presumably a change in behaviour between version 1.42.01 and 1.45? In any event, disabling the Alert Rule which used that template cleared the problem, and I’ve now (finally) converted that Alert Template correctly which has resolved the problem.

I’ve got rid of the legacy transports and the new default transports are working perfectly.

Thanks for the help.