From a5a2ecf990823387ee11d0cbe76b8dbc6cc84c52 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Fri, 6 May 2011 14:04:53 +0000 Subject: [PATCH] fenner be quiet git-svn-id: http://www.observium.org/svn/observer/trunk@2264 61d68cd4-352d-0410-923a-c4978735b2b8 --- discovery.php | 9 ++++++--- includes/polling/ports.inc.php | 20 ++++++++++++++++++++ 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/discovery.php b/discovery.php index ac86b23e6..6d744be71 100755 --- a/discovery.php +++ b/discovery.php @@ -22,9 +22,12 @@ $runtime_stats = array(); ### Observium Device Discovery -echo("Observium v".$config['version']." Discovery\n\n"); +$options = getopt("h:m:i:n:d::a::q"); -$options = getopt("h:m:i:n:d::a::"); +if (!isset($options['q'])) +{ + echo("Observium v".$config['version']." Discovery\n\n"); +} if (isset($options['h'])) { @@ -240,7 +243,7 @@ if ($discovered_devices) $string = $argv[0] . " $doing " . date("F j, Y, G:i") . " - $discovered_devices devices discovered in $proctime secs"; if ($debug) echo("$string\n"); -if($config['version_check']) { +if($config['version_check'] && !isset($options['q'])) { include("includes/versioncheck.inc.php"); } diff --git a/includes/polling/ports.inc.php b/includes/polling/ports.inc.php index f5f616a1b..4ab7d2db1 100755 --- a/includes/polling/ports.inc.php +++ b/includes/polling/ports.inc.php @@ -73,6 +73,22 @@ if ($device['adsl_count'] > "0") $port_stats = snmpwalk_cache_oid($device, ".1.3.6.1.2.1.10.94.1.1.7.1.7", $port_stats, "ADSL-LINE-MIB"); } +## Alcatel Detailed Statistics ## FIXME make this disableable +if($device['os'] == "aos") { + $stat_oids = array('alcetherStatsCRCAlignErrors', 'alcetherStatsRxUndersizePkts','alcetherStatsTxUndersizePkts', 'alcetherStatsTxOversizePkts','alcetherStatsRxJabbers', 'alcetherStatsRxCollisions', 'alcetherStatsTxCollisions', + 'alcetherStatsPkts64Octets','alcetherStatsPkts65to127Octets', 'alcetherStatsPkts128to255Octets','alcetherStatsPkts256to511Octets','alcetherStatsPkts512to1023Octets','alcetherStatsPkts1024to1518Octets', + 'gigaEtherStatsPkts1519to4095Octets','gigaEtherStatsPkts4096to9215Octets','alcetherStatsPkts1519to2047Octets','alcetherStatsPkts2048to4095Octets','alcetherStatsPkts4096Octets','alcetherStatsRxGiantPkts', + 'alcetherStatsRxDribbleNibblePkts','alcetherStatsRxLongEventPkts','alcetherStatsRxVlanTagPkts','alcetherStatsRxControlPkts','alcetherStatsRxLenChkErrPkts','alcetherStatsRxCodeErrPkts','alcetherStatsRxDvEventPkts', + 'alcetherStatsRxPrevPktDropped','alcetherStatsTx64Octets','alcetherStatsTx65to127Octets','alcetherStatsTx128to255Octets','alcetherStatsTx256to511Octets','alcetherStatsTx512to1023Octets', + 'alcetherStatsTx1024to1518Octets','alcetherStatsTx1519to2047Octets','alcetherStatsTx2048to4095Octets','alcetherStatsTx4096Octets','alcetherStatsTxRetryCount','alcetherStatsTxVlanTagPkts', + 'alcetherStatsTxControlPkts','alcetherStatsTxLatePkts','alcetherStatsTxTotalBytesOnWire','alcetherStatsTxLenChkErrPkts','alcetherStatsTxExcDeferPkts'); + + foreach($stat_oids as $oid) + { + $port_stats = snmpwalk_cache_oid($device, "alcetherStatsEntry", $port_stats, "ALCATEL-IND1-PORT-MIB"); + } +} + echo("\n"); /// FIXME This probably needs re-enabled. We need to clear these things when they get unset, too. @@ -288,6 +304,10 @@ while ($port = mysql_fetch_assoc($port_query)) /// Do PoE MIBs if ($config['enable_ports_poe']) { include("port-poe.inc.php"); } + /// Do Alcatel Detailed Stats + if($device['os'] == "aos") { include("port-alcatel.inc.php"); } + + // Update MySQL if ($update) {