diff --git a/html/graph.php b/html/graph.php
index bf24aa527..c2027b761 100644
--- a/html/graph.php
+++ b/html/graph.php
@@ -15,7 +15,9 @@ if($_GET['debug']) {
include("../includes/rewrites.php");
include("includes/authenticate.inc.php");
- if(!$_SESSION['authenticated']) { echo("not authenticated"); exit; }
+ if(!$config['allow_unauth_graphs']) {
+ if(!$_SESSION['authenticated']) { echo("not authenticated"); exit; }
+ }
if($_GET['device']) {
$_GET['id'] = $_GET['device'];
diff --git a/includes/defaults.inc.php b/includes/defaults.inc.php
index 2546b0a0d..365a9121b 100644
--- a/includes/defaults.inc.php
+++ b/includes/defaults.inc.php
@@ -83,6 +83,8 @@ $config['ignore_mount_optical'] = 1; # Ignore mounted optical discs
$config['device_traffic_iftype'] = array('/loopback/','/other/','/tunnel/','/virtual/','/mpls/');
$config['device_traffic_descr'] = array('/loopback/','/vlan/','/tunnel/','/:/');
+$config['allow_unauth_graphs'] = 0; ## Allow graphs to be viewed by anyone
+
# Sensors
$config['allow_entity_sensor']['amperes'] = 1;
diff --git a/poll-device.php b/poll-device.php
index 825256649..49253c754 100755
--- a/poll-device.php
+++ b/poll-device.php
@@ -78,6 +78,9 @@ while ($device = mysql_fetch_array($device_query)) {
mysql_query("UPDATE `devices` SET `status` = '".$status."' WHERE `device_id` = '".$device['device_id']."'");
mysql_query("INSERT INTO alerts (importance, device_id, message) VALUES ('0', '" . $device['device_id'] . "', 'Device is " .($status == '1' ? 'up' : 'down') . "')");
eventlog('Device status changed to ' . ($status == '1' ? 'Up' : 'Down'), $device['device_id']);
+ mail($email, "Device ".($status == '1' ? 'Up' : 'Down').": " . $device['hostname'], "Device ".($status == '1' ? 'up' : 'down').": " . $device['hostname'] . " at " . date($config['timestamp_format']), $config['email_headers']);
+
+
}
if ($status == "1")