|
|
| Author |
Message |
JJX Cacti User
Joined: 06 Oct 2005 Posts: 171
|
Posted: Fri Oct 07, 2005 3:10 am Post subject: 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
|
|
| Back to top |
|
 |
JJX Cacti User
Joined: 06 Oct 2005 Posts: 171
|
Posted: Fri Oct 07, 2005 3:21 am Post subject: |
|
|
| Code: | 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, '');
}
|
change this code in plugins/thold/setup.php
|
|
| Back to top |
|
 |
cigamit Developer
Joined: 07 Apr 2005 Posts: 978 Location: B/CS Texas
|
Posted: Fri Nov 11, 2005 12:47 pm Post subject: |
|
|
| JJX wrote: | | Code: | 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, '');
}
|
change this code in plugins/thold/setup.php |
Maybe I should make this a configurable option? It would be simple enough, but would anyone else use it?
|
|
| Back to top |
|
 |
JJX Cacti User
Joined: 06 Oct 2005 Posts: 171
|
Posted: Sun Nov 13, 2005 11:57 am Post subject: |
|
|
it would be really usefull
|
|
| Back to top |
|
 |
joed
Joined: 19 Sep 2005 Posts: 29 Location: Germany/Palatinate
|
Posted: Sun Nov 13, 2005 12:32 pm Post subject: |
|
|
could be usefull, if alarm email is sent to a not english speaking person
|
|
| Back to top |
|
 |
ancery
Joined: 03 Nov 2005 Posts: 11
|
Posted: Mon Nov 14, 2005 2:15 am Post subject: |
|
|
| cigamit wrote: |
Maybe I should make this a configurable option? It would be simple enough, but would anyone else use it? |
yes, it's very useful for me,
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
|
|
| Back to top |
|
 |
cigamit Developer
Joined: 07 Apr 2005 Posts: 978 Location: B/CS Texas
|
Posted: Mon Nov 14, 2005 9:20 am Post subject: |
|
|
| ancery wrote: | | cigamit wrote: |
Maybe I should make this a configurable option? It would be simple enough, but would anyone else use it? |
yes, it's very useful for me,
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.
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.
|
|
| Back to top |
|
 |
ancery
Joined: 03 Nov 2005 Posts: 11
|
Posted: Tue Nov 15, 2005 3:49 am Post subject: |
|
|
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!!
| Description: |
|
| Filesize: |
4.25 KB |
| Viewed: |
2542 Time(s) |

|
|
|
| Back to top |
|
 |
cigamit Developer
Joined: 07 Apr 2005 Posts: 978 Location: B/CS Texas
|
Posted: Tue Nov 15, 2005 9:54 am Post subject: |
|
|
| 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!!  |
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?
|
|
| Back to top |
|
 |
ancery
Joined: 03 Nov 2005 Posts: 11
|
Posted: Wed Nov 16, 2005 12:40 am Post subject: |
|
|
| 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? |
yes, i added a new device, and did it just follow your README,
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!!
|
|
| Back to top |
|
 |
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|