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

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");
?>

View File

@@ -32,13 +32,17 @@ foreach ($rrd_list as $rrd)
$colour_in=$config['graph_colours'][$colours_in][$iter];
$colour_out=$config['graph_colours'][$colours_out][$iter];
$descr = str_replace(":", "\:", substr(str_pad($rrd['descr'], $descr_len),0,$descr_len)) . " In";
if (isset($rrd['descr_in']))
{
$descr = str_replace(":", "\:", substr(str_pad($rrd['descr_in'], $descr_len),0,$descr_len)) . " In";
} else {
$descr = str_replace(":", "\:", substr(str_pad($rrd['descr'], $descr_len),0,$descr_len)) . " In";
}
$descr_out = str_replace(":", "\:", substr(str_pad($rrd['descr_out'], $descr_len),0,$descr_len)). " Out";
$descr = str_replace("'", "", $descr);
$descr_out = str_replace("'", "", $descr_out);
$rrd_options .= " DEF:".$in.$i."=".$rrd['filename'].":".$ds_in.":AVERAGE ";
$rrd_options .= " DEF:".$out.$i."=".$rrd['filename'].":".$ds_out.":AVERAGE ";
$rrd_options .= " CDEF:inB".$i."=in".$i.",$multiplier,* ";

View File

@@ -370,6 +370,7 @@ $config['poller_modules']['cipsec-tunnels'] = 1;
$config['poller_modules']['cisco-ace-loadbalancer'] = 1;
$config['poller_modules']['cisco-ace-serverfarms'] = 1;
$config['poller_modules']['netscaler-vsvr'] = 1;
$config['poller_modules']['entity-physical'] = 1;
## List of discovery modules. Need to be in this array to be
## considered for execution.
@@ -399,6 +400,7 @@ $config['discovery_modules']['toner'] = 1;
$config['discovery_modules']['ucd-diskio'] = 1;
$config['discovery_modules']['services'] = 1;
$config['modules_compat']['rfc1628']['liebert'] = 1;
$config['modules_compat']['rfc1628']['netmanplus'] = 1;
$config['modules_compat']['rfc1628']['deltaups'] = 1;