Cactiusers.org


It is currently Thu May 17, 2012 9:43 am




Post new topic Reply to topic  [ 5 posts ] 
 Thold Emails 
Author Message
New User

Joined: Fri Feb 10, 2006 11:40 am
Posts: 2
Post Thold Emails
Hi,

In which file does Thold keep the template for its alert emails as I would like to change what it sends.

Thanks.

AW


Fri Feb 10, 2006 11:43 am
Site Admin

Joined: Thu Nov 11, 2004 11:12 am
Posts: 2007
Post 
The 2 files that handle the messages, and the sending of the message (including embedded the image) are

thold/check-thold.php
thod/thold-functions.php

It spread out a little, but should be easy to find.


Fri Feb 10, 2006 2:09 pm
New User

Joined: Fri Feb 10, 2006 11:40 am
Posts: 2
Post 
ty


Mon Feb 13, 2006 5:17 am
New User

Joined: Thu Apr 13, 2006 2:02 pm
Posts: 2
Post Changing the Emails
I am trying to add the Device Description to the emails. We use ip for the host reference so we need this for the email to make more understandable. Is there any way to add this to setup.php where the code has

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, '');
}


I can see where it puts the host_id (the IP address) I just can't find where to pull the Description from the DB and add it in there.

Thank you for your help


Thu Apr 13, 2006 2:16 pm
Site Admin

Joined: Thu Nov 11, 2004 11:12 am
Posts: 2007
Post Re: Changing the Emails
ahardman wrote:
I am trying to add the Device Description to the emails. We use ip for the host reference so we need this for the email to make more understandable. Is there any way to add this to setup.php where the code has
[snip]
I can see where it puts the host_id (the IP address) I just can't find where to pull the Description from the DB and add it in there.

Thank you for your help


Add it to the bug tracker as a Feature Request, and I will have it display both the description and the IP address, since both of them are useful enough. Adding it to the tracker ensures I don't forget about it.


Thu Apr 13, 2006 10:19 pm
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 


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

Search for: