diff --git a/check-errors.php b/check-errors.php index 6f87249ec8..676f9fa01f 100755 --- a/check-errors.php +++ b/check-errors.php @@ -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"); + ?> diff --git a/html/includes/graphs/generic_multi_bits_separated.inc.php b/html/includes/graphs/generic_multi_bits_separated.inc.php index 7b0d7ab4af..d9dc29ca37 100644 --- a/html/includes/graphs/generic_multi_bits_separated.inc.php +++ b/html/includes/graphs/generic_multi_bits_separated.inc.php @@ -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,* "; diff --git a/includes/defaults.inc.php b/includes/defaults.inc.php index 0814510861..b4296a62e2 100644 --- a/includes/defaults.inc.php +++ b/includes/defaults.inc.php @@ -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;