thold and mails
Moderators: Developers, Moderators
thold and mails
is possible to change the text that sends thold when a host goes down?
searching i found that i should change ping.c but this file doesnt exist
i am using cacti 0.8.6g / debian sarge
searching i found that i should change ping.c but this file doesnt exist
i am using cacti 0.8.6g / debian sarge
Code: Select all
if ($status != HOST_DOWN) {
$subject = "Host Notice : " . $hosts[$host_id]["hostname"] . " returned from DOWN state";
$msg= $subject;
thold_mail(read_config_option("alert_email"), '', $subject, $msg, '');
} else {
$subject = "Host Error : " . $hosts[$host_id]["hostname"] . " is DOWN";
$msg ="Host Error : " . $hosts[$host_id]["hostname"] . " is DOWN<br>Message : " . $hosts[$host_id]["status_last_error"];
thold_mail(read_config_option("alert_email"), '', $subject, $msg, '');
}
Maybe I should make this a configurable option? It would be simple enough, but would anyone else use it?JJX wrote:change this code in plugins/thold/setup.phpCode: Select all
if ($status != HOST_DOWN) { $subject = "Host Notice : " . $hosts[$host_id]["hostname"] . " returned from DOWN state"; $msg= $subject; thold_mail(read_config_option("alert_email"), '', $subject, $msg, ''); } else { $subject = "Host Error : " . $hosts[$host_id]["hostname"] . " is DOWN"; $msg ="Host Error : " . $hosts[$host_id]["hostname"] . " is DOWN<br>Message : " . $hosts[$host_id]["status_last_error"]; thold_mail(read_config_option("alert_email"), '', $subject, $msg, ''); }
yes, it's very useful for me,cigamit wrote: Maybe I should make this a configurable option? It would be simple enough, but would anyone else use it?
and would you make a option to change the units about disk usage and so on, the long number often confused me
thx for your great job, it's very useful for me, thank you!!
and also, would it possible to add a sound alarm, it may very useful for me!!! thx again
I am currently working on making the text configurable, and adding Sound is currently in the works also.ancery wrote:yes, it's very useful for me,cigamit wrote: Maybe I should make this a configurable option? It would be simple enough, but would anyone else use it?
and would you make a option to change the units about disk usage and so on, the long number often confused me
thx for your great job, it's very useful for me, thank you!!
and also, would it possible to add a sound alarm, it may very useful for me!!! thx again
As far as the units on disk space, this is something that is best if handled by the output scripts. If it isn't returning the units you want, I would recommend changing the scripts. I actually did this with the Host - Disk Space scripts that come with Cacti. I modified them to also output a "percentage" that can be used by Thold. You can find that script here.
http://cactiusers.org/forums/viewtopic.php?t=107
Let me know how that works out for you.
hi cigamit, thx for your reply, i'm very excited to hear your good news,
and I try your scripts just now, it really could show the percentage of disk graphs, but i couldn't find the units,
and when i wanted to set the thold, i have found the current value showing nothing, so the thold has no effect,
could u tell me what's wrong with me, thank you!!
and I try your scripts just now, it really could show the percentage of disk graphs, but i couldn't find the units,
and when i wanted to set the thold, i have found the current value showing nothing, so the thold has no effect,
could u tell me what's wrong with me, thank you!!
- Attachments
-
- Snap1.jpg (4.25 KiB) Viewed 6610 times
Is this on a new datasource, or one that you already had setup? You will have to recreate all the datasources and graphs for those devices that use it. Does it show data in the graph?ancery wrote:hi cigamit, thx for your reply, i'm very excited to hear your good news,
and I try your scripts just now, it really could show the percentage of disk graphs, but i couldn't find the units,
and when i wanted to set the thold, i have found the current value showing nothing, so the thold has no effect,
could u tell me what's wrong with me, thank you!!
yes, i added a new device, and did it just follow your README,cigamit wrote:Is this on a new datasource, or one that you already had setup? You will have to recreate all the datasources and graphs for those devices that use it. Does it show data in the graph?
i can see the data in the graph, but all graph "current value" in thold had gone, so i had to restore the 2 files, and i'm sure there's something wrong in them,
need your help!!
Who is online
Users browsing this forum: No registered users and 2 guests