Dear All ,
I am needing which in mails that arrives to me with the alarms it includes the hostname of each equipment and not only the IP. Exists some form of which they arrive mails with the IP and hostame or description of the equipment?
Example :
_________
Subject: Host Error : 200.xxx.xxx.xxx is DOWN
Host Error : 200.xxx.xxx.xxx is DOWN
Message : Host did not respond to SNMP
Thanks.
Best Regards.
TELCO
Cacti e-mails alarms
Moderators: Developers, Moderators
Here is the modification I made to include the device description in the email subject. You'll need to modify the plugins/thold/setup.php file,
Find,And change it to,
This will change the subject of your alerts messages from "Host Error: [host ip address] is DOWN" to "Host Error: [host description] ([host ip address]) is DOWN". It will also change "Host Notice: [host ip address] returned from DOWN state" to "Host Notice: [host description] ([host ip address]) returned from DOWN state".
I hope this helps.
Find,
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, '');
}
Code: Select all
if ($status != HOST_DOWN) {
$subject = "Host Notice : " . $hosts[$host_id]["description"] . "(" . $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]["description"] . "(" . $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 hope this helps.
Who is online
Users browsing this forum: No registered users and 2 guests