|
It is currently Mon May 21, 2012 5:24 pm
|
View unanswered posts | View active topics
| Author |
Message |
|
DwayneDibbley
New User
Joined: Sat Sep 17, 2005 5:01 am Posts: 15
|
 thold problem
main threshold page does not update last poll 23:00 ( time of shots 11:00 following day )
thresholds reports correct current value 202227
but threshold tab report old value and not updating
cacti 8.6g with thold plugin on windows :(
and ideas log that might help
Thanks
|
| Sat Sep 17, 2005 5:14 am |
|
 |
|
DwayneDibbley
New User
Joined: Sat Sep 17, 2005 5:01 am Posts: 15
|
Update:
Dropped all thold tables from mysql and manually rerun sql script, thold working again
Broken again:
Works fine upto when it breaches a threshold ie high set to 50000 currnet value 60000
but if i manually run the check-thold.php it updates fine then runs ok again
Disable All email functions and now all works
Code: cacti_log("4", true, "THOLD");
$subject = "$desc restored to normal threshold with value $currentval"; if($global_notify_enabled || $item["notify_default"] == "on") {
cacti_log("5", true, "THOLD");
//mail($global_alert_address, $subject, $msg, "Content-Type: text/html\n"); thold_mail($global_alert_address, '', $subject, $msg, $file_array); } if(trim($item["notify_extra"]) != "") {
cacti_log("6", true, "THOLD"); //mail($item["notify_extra"], $subject, $msg, "Content-Type: text/html\n"); thold_mail($item["notify_extra"], '', $subject, $msg, $file_array); } } } cacti_log("7", true, "THOLD");
when email was enable it stoped at "cacti_log("5",true,"THOLD")"
|
| Sun Sep 18, 2005 6:33 am |
|
 |
|
DwayneDibbley
New User
Joined: Sat Sep 17, 2005 5:01 am Posts: 15
|
Found where it hangs script ends as soon as $ mail = new PHPMAiler()
Code: function thold_mail($to, $from, $subject, $message, $filename, $headers = '') { global $config; include_once("plugins/thold/class.phpmailer.php"); cacti_log("1", true, "MAIL"); $mail = new PHPMailer();
and ideas
|
| Tue Sep 20, 2005 11:52 am |
|
 |
|
DwayneDibbley
New User
Joined: Sat Sep 17, 2005 5:01 am Posts: 15
|
 Sorted
needed to change in thold-functions.php from
Code: function thold_mail($to, $from, $subject, $message, $filename, $headers = '') { global $config; include_once("plugins/thold/class.phpmailer.php"); to Code: function thold_mail($to, $from, $subject, $message, $filename, $headers = '') { global $config; include_once($config["base_path"] . "/plugins/thold/class.phpmailer.php");
|
| Tue Sep 20, 2005 12:05 pm |
|
 |
|
Guest
|
 Thank you!!!
Dwayne, thank you very much for sharing your knowledge and of course for fixing the problem!
I have one more question:
Threshold alerting via email is running very well, but when a host is dead I get know email. Do have any idea, why i´m not getting an email?
Thanks in advice,
Alex.
|
| Wed Sep 21, 2005 3:34 am |
|
 |
|
jimmy
Site Admin
Joined: Thu Nov 11, 2004 11:12 am Posts: 2007
|
 Re: Sorted
DwayneDibbley wrote: needed to change in thold-functions.php from Code: function thold_mail($to, $from, $subject, $message, $filename, $headers = '') { global $config; include_once("plugins/thold/class.phpmailer.php"); to Code: function thold_mail($to, $from, $subject, $message, $filename, $headers = '') { global $config; include_once($config["base_path"] . "/plugins/thold/class.phpmailer.php");
Thanks for the patch. I have also updated another place in setup.php that could possibly be causing the issues with host down emails. I will update the version number and post once I can confirm that it does fix the host down issue.
|
| Wed Sep 21, 2005 6:59 pm |
|
 |
|
DwayneDibbley
New User
Joined: Sat Sep 17, 2005 5:01 am Posts: 15
|
Dead hosts email works fine here
|
| Sat Sep 24, 2005 11:34 am |
|
 |
|
Alex72
New User
Joined: Mon Sep 26, 2005 2:04 am Posts: 3
|
I get no dead host notificatin email :-(
Thresholds notification email work fine, though. And on the Threshold-Page dead hosts are shown with status "down" - but I get no email notification.
I use Cacti 0.8.6g with Plugin-Architecture 0.8, Thold Plugin 0.2.4 and Monitor Plugin 0.3 on Suse Professional 9.1
Any idea, why i´m not notified via email when a host goes down?
Thanks,
Alex.
|
| Mon Sep 26, 2005 2:14 am |
|
 |
|
Dwayne_Dibbley
|
The only difference between us seems to be the OS im running Windows 2003 but all same versions as you.
Sorry
|
| Mon Sep 26, 2005 4:29 am |
|
 |
|
jimmy
Site Admin
Joined: Thu Nov 11, 2004 11:12 am Posts: 2007
|
Alex72 wrote: I get no dead host notificatin email :-(
Thresholds notification email work fine, though. And on the Threshold-Page dead hosts are shown with status "down" - but I get no email notification.
I use Cacti 0.8.6g with Plugin-Architecture 0.8, Thold Plugin 0.2.4 and Monitor Plugin 0.3 on Suse Professional 9.1
Any idea, why i´m not notified via email when a host goes down?
Thanks, Alex.
I assume you have the Dead Host Notification option checked (Settings >> Thold >> Dead Host Notification). I thought I would check that first just to be sure before I try to debug the code somemore.
Attachments:
File comment: Dead Host Notification
dead.jpg [5.18 KiB]
Downloaded 3618 times
|
| Mon Sep 26, 2005 10:21 am |
|
 |
|
Alex72
New User
Joined: Mon Sep 26, 2005 2:04 am Posts: 3
|
Yes, the Dead Host Notification option checked!
When a host is down its status on the Thold-Page is correctly displayed with Status "down". But I just receive no email!
Thanks!
Alex.
|
| Tue Sep 27, 2005 7:09 am |
|
 |
|
jimmy
Site Admin
Joined: Thu Nov 11, 2004 11:12 am Posts: 2007
|
Alex72 wrote: Yes, the Dead Host Notification option checked!
When a host is down its status on the Thold-Page is correctly displayed with Status "down". But I just receive no email!
Thanks! Alex.
I have uploaded a new version (v0.2.5). Give it a try and see if everything starts working properly for you. I fixed some major issues with the Mailing functions.
|
| Mon Oct 03, 2005 3:03 pm |
|
 |
|
Guest
|
jimmy wrote: Alex72 wrote: Yes, the Dead Host Notification option checked!
When a host is down its status on the Thold-Page is correctly displayed with Status "down". But I just receive no email!
Thanks! Alex. I have uploaded a new version (v0.2.5). Give it a try and see if everything starts working properly for you. I fixed some major issues with the Mailing functions.
I updated mine and still getting same problem. In fact I still copy pasted that fix posted above in my thold_functions.php file because I was recieving no emails. Now I get emails but still do not get dead host notification even though Thold does show the system as down. I use cactid as my poller.
-Josh
|
| Tue Oct 04, 2005 8:14 am |
|
 |
|
jimmy
Site Admin
Joined: Thu Nov 11, 2004 11:12 am Posts: 2007
|
Anonymous wrote: jimmy wrote: Alex72 wrote: Yes, the Dead Host Notification option checked!
When a host is down its status on the Thold-Page is correctly displayed with Status "down". But I just receive no email!
Thanks! Alex. I have uploaded a new version (v0.2.5). Give it a try and see if everything starts working properly for you. I fixed some major issues with the Mailing functions. I updated mine and still getting same problem. In fact I still copy pasted that fix posted above in my thold_functions.php file because I was recieving no emails. Now I get emails but still do not get dead host notification even though Thold does show the system as down. I use cactid as my poller. -Josh Oops, that was a mistake on my part. I somehow used an older version of thold-functions.php and setup.php that didn't have these changes in them. Maybe I should setup a CVS so that I don't have this issue. Thanks for bringing it to my attention (again). If you would open your setup.php and try changing this Quote: function thold_update_host_status ($update) { $deadnotify = (read_config_option("alert_deadnotify") == "on"); if (!$deadnotify) return; if (!$update['issue_log_message']) return;
include_once('plugins/thold/thold-functions.php');
$host_id = $update['host_id']; $hosts = $update['hosts']; $status = $update['status']; to this Quote: function thold_update_host_status ($update) { global $config; $deadnotify = (read_config_option("alert_deadnotify") == "on"); if (!$deadnotify) return; if (!$update['issue_log_message']) return;
include_once($config["base_path"] . '/plugins/thold/thold-functions.php');
$host_id = $update['host_id']; $hosts = $update['hosts']; $status = $update['status'];
and see if it fixes your issue with Down Emails.
|
| Tue Oct 04, 2005 9:15 am |
|
 |
|
josh
New User
Joined: Tue Oct 04, 2005 8:15 am Posts: 17
|
Still no luck, I copy pasted the above posting fix originally in this thread into my thold_functions, and then did your suggested fix into setup.php and I still do not recieve notification when a host is down.
Also when functioning, does it send out new notifications once a host comes back up as well? Or only when down?
-Josh
|
| Tue Oct 04, 2005 12:52 pm |
|
|
Who is online |
Users browsing this forum: No registered users and 1 guest |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|