mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-30 16:14:21 +02:00
improved emailing and additional configuration options to use phpmailer. (#38 from Mike Stupalov)
git-svn-id: http://www.observium.org/svn/observer/trunk@3089 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -44,14 +44,14 @@ while ($device = mysql_fetch_assoc($device_query))
|
||||
mysql_query("INSERT INTO alerts (importance, device_id, message) VALUES ('0', '" . $device['device_id'] . "', 'Device is up\n')");
|
||||
if ($config['alerts']['email']['enable'])
|
||||
{
|
||||
notify($device, "Device Up: " . $device['hostname'], "Device Up: " . $device['hostname'] . " at " . date($config['timestamp_format']));
|
||||
notify($device, "Device Up: " . $device['hostname'], "Device Up: " . $device['hostname']);
|
||||
}
|
||||
} else {
|
||||
$stat = "Down";
|
||||
mysql_query("INSERT INTO alerts (importance, device_id, message) VALUES ('9', '" . $device['device_id'] . "', 'Device is down\n')");
|
||||
if ($config['alerts']['email']['enable'])
|
||||
{
|
||||
notify($device, "Device Down: " . $device['hostname'], "Device Down: " . $device['hostname'] . " at " . date($config['timestamp_format']));
|
||||
notify($device, "Device Down: " . $device['hostname'], "Device Down: " . $device['hostname']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user