add entity-physical back to poller module list (duh!)

git-svn-id: http://www.observium.org/svn/observer/trunk@2855 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2012-02-03 18:37:00 +00:00
parent dcf48ae16d
commit 2c21b7f734
3 changed files with 16 additions and 5 deletions
+9 -4
View File
@@ -4,26 +4,29 @@
include("includes/defaults.inc.php");
include("config.php");
include("includes/functions.php");
include("html/includes/functions.inc.php");
## Check all of our interface RRD files for errors
if ($argv[1]) { $where = "AND `interface_id` = ?"; $params = array($argv[1]); }
$i = '0';
$i = 0;
$errored = 0;
foreach (dbFetchRows("SELECT * FROM `ports` AS I, `devices` AS D WHERE I.device_id = D.device_id $where", $params) as $interface)
{
$errors = $interface['ifInErrors_delta'] + $interface['ifOutErrors_delta'];
if ($errors > '1')
{
$errored[] = $interface['hostname'] . " - " . $interface['ifDescr'] . " - " . $interface['ifAlias'] . " - " . $interface['ifInErrors_delta'] . " - " . $interface['ifOutErrors_delta'];
$errored[] = generate_device_link($interface, $interface['hostname'] . " - " . $interface['ifDescr'] . " - " . $interface['ifAlias'] . " - " . $interface['ifInErrors_delta'] . " - " . $interface['ifOutErrors_delta']);
$errored++;
}
$i++;
}
echo("Checked $i Interfaces\n");
echo("Checked $i interfaces\n");
if ($errored)
if (is_array($errored))
{ ## If there are errored ports
$i = 0;
$msg = "Interfaces with errors : \n\n";
@@ -37,4 +40,6 @@ if ($errored)
notify($device, "Observium detected errors on $i interface" . ($i != 1 ? 's' : ''), $msg);
}
echo("$errored interfaces with errors over the past 5 minutes.\n");
?>