thold 0.4.9-3 bugs: fixed (download patch here)

Support questions about the Threshold plugin

Moderators: Developers, Moderators

Post Reply
computer_guru
Cacti User
Posts: 141
Joined: Thu Apr 10, 2008 6:52 pm

thold 0.4.9-3 bugs: fixed (download patch here)

Post by computer_guru »

I noticed a bug where thold 0.4.9-3 would display associated notification list for a host incorrectly even though it was acutally associated with the correct list.


in file notify_lists.php

line 877

currently:
form_selectable_cell('<span style="color:red;font-weight:bold;">' . db_fetch_cell("SELECT name FROM plugin_notification_lists WHERE id=" . get_request_var_request('id')) . '</span>', $host['id']);

should be this to fix:
form_selectable_cell('<span style="color:red;font-weight:bold;">' . db_fetch_cell("SELECT name FROM plugin_notification_lists WHERE id=" . $host['thold_host_email']) . '</span>', $host['id']);
Attachments
notify_lists.php.txt
put file in thold folder
(87.63 KiB) Downloaded 423 times
Last edited by computer_guru on Thu Mar 22, 2012 10:37 am, edited 4 times in total.
computer_guru
Cacti User
Posts: 141
Joined: Thu Apr 10, 2008 6:52 pm

Re: notification lists bug: fixed

Post by computer_guru »

I found another bug in thold 0.4.9-3

if you have hosts that are recovering and hosts that are down in the same polling cycle, then the emails may be sent to the wrong notification lists. I have attached a fixed version of the file.

lines modified: 278 and 368

[update 3/14/12] - Uploaded a newer version with another minor bug fix for notification lists. (email would sometimes be sent to the correct notify list + the wrong notify list)

[update 3/22/12] - Uploaded a newer version again. My last fix solved the intended bug, but created a new bug. Both bugs are fixed now. (Emails going to global + notify list would only go to notify list)
Attachments
polling.php.txt
put in the thold/includes folder
(18.27 KiB) Downloaded 326 times
computer_guru
Cacti User
Posts: 141
Joined: Thu Apr 10, 2008 6:52 pm

Re: thold 0.4.9-3 bugs: fixed (download patch here)

Post by computer_guru »

File in post above has been updated.
lightenup
Posts: 19
Joined: Mon Dec 06, 2010 10:09 am

Re: thold 0.4.9-3 bugs: fixed (download patch here)

Post by lightenup »

Thank you for this, I have been having this exact problem. Last night 87 hosts went down and I got a rude awakening at 2am for devices that I do not support!
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests