db update

git-svn-id: http://www.observium.org/svn/observer/trunk@980 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong 2010-03-01 02:21:08 +00:00
parent 7302fc9022
commit 0c79c7a509
4 changed files with 9 additions and 6 deletions

View File

@ -117,4 +117,5 @@ ALTER TABLE `storage` ADD `storage_free` INT NOT NULL AFTER `storage_used`;
ALTER TABLE `storage` CHANGE `storage_size` `storage_size` BIGINT NOT NULL ,CHANGE `storage_used` `storage_used` BIGINT NOT NULL ,CHANGE `storage_free` `storage_free` BIGINT NOT NULL;
ALTER TABLE `mempools` CHANGE `mempool_used` `mempool_used` BIGINT( 20 ) NOT NULL ,
CHANGE `mempool_free` `mempool_free` BIGINT( 20 ) NOT NULL ,CHANGE `mempool_total` `mempool_total` BIGINT( 20 ) NOT NULL ,CHANGE `mempool_largestfree` `mempool_largestfree` BIGINT( 20 ) NULL DEFAULT NULL ,CHANGE `mempool_lowestfree` `mempool_lowestfree` BIGINT( 20 ) NULL DEFAULT NULL;
CREATE TABLE IF NOT EXISTS `juniAtmVp` ( `juniAtmVp_id` int(11) NOT NULL, `interface_id` int(11) NOT NULL, `vp_id` int(11) NOT NULL, `vp_descr` varchar(32) NOT NULL) ENGINE=MyISAM DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `juniAtmVp` ( `juniAtmVp_id` int(11) NOT NULL AUTO_INCREMENT, `interface_id` int(11) NOT NULL, `vp_id` int(11) NOT NULL, `vp_descr` varchar(32) NOT NULL, PRIMARY KEY (`juniAtmVp_id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

View File

@ -88,7 +88,7 @@ while ($device = mysql_fetch_array($device_query))
#include("includes/discovery/os.inc.php");
include("includes/discovery/ports.inc.php");
include("includes/discovery/entity-physical.inc.php");
# include("includes/discovery/entity-physical.inc.php");
include("includes/discovery/processors.inc.php");
include("includes/discovery/mempools.inc.php");
include("includes/discovery/ipv4-addresses.inc.php");
@ -103,7 +103,6 @@ while ($device = mysql_fetch_array($device_query))
include("includes/discovery/junose-atm-vp.inc.php");
include("includes/discovery/bgp-peers.inc.php");
include("includes/discovery/q-bridge-mib.inc.php");
include("includes/discovery/cisco-vlans.inc.php");
include("includes/discovery/cisco-mac-accounting.inc.php");
include("includes/discovery/cisco-pw.inc.php");

View File

@ -5,10 +5,10 @@ function discover_juniAtmVp(&$exists, $interface_id, $vp_id, $vp_descr) {
global $config; global $debug;
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `juniAtmVp` WHERE `interface_id` = '".$interface_id."' AND `vp_id` = '".$vp_id."'"),0) == "0")
{
echo(".");
} else {
$sql = "INSERT INTO `juniAtmVP` (`interface_id`,`vp_id`,`vp_descr`) VALUES ('".$interface_id."','".$vp_id."','".$vp_descr."')";
$sql = "INSERT INTO `juniAtmVp` (`interface_id`,`vp_id`,`vp_descr`) VALUES ('".$interface_id."','".$vp_id."','".$vp_descr."')";
mysql_query($sql); echo("+"); if($debug) { echo($sql . " - " . mysql_affected_rows() . "inserted "); }
} else {
echo(".");
}
$exists[$interface_id][$vp_id] = 1;

View File

@ -27,5 +27,8 @@ $cpurrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/junose-cpu.rrd";
#$cpu_usage = trim(shell_exec($cpu_cmd));
include("hr-mib.inc.php");
include("junose-atm-vp.inc.php");
?>