Cacti / plugin_thold

Thold Plugin for Cacti
GNU General Public License v2.0
60 stars 60 forks source link

Device up/down notification emails don't appear to be sent if the notification queue is enabled #673

Closed maforshaw closed 2 weeks ago

maforshaw commented 1 month ago

Describe the bug Device up/down notification emails don't appear to be sent if the notification queue is enabled.

To Reproduce Enable the notification queue in settings and force a device up/down event. Wait for a polling cycle and check the notification queue page. The email is listed but stays stuck forever in the "pending" state.

Expected behavior An email should be sent and the queue status changed to "done".

The problem appears to be in "thold_functions.php" in the function "process_device_notifications" on line 6957:

AND topic NOT IN ('thold_dhost_mail', 'thold_uhost_mail', 'thold_dhost_cmd', 'thold_uhost_cmd')

The NOT seems to be incorrect and should be removed. If you look at the case statements a few lines below it is checking for the topics excluded by that NOT.

I removed the NOT in my copy and the notification queue now works. This issue appears to have been introduced in commit https://github.com/Cacti/plugin_thold/commit/2ca8a0083c4e2c2dbdc6aae220bb7d6a5d6f1ee0

TheWitness commented 2 weeks ago

This is fixed now. Thanks for reporting.