mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
db update
git-svn-id: http://www.observium.org/svn/observer/trunk@980 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
+2
-1
@@ -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 `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 ,
|
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;
|
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 ;
|
||||||
|
|
||||||
|
|||||||
+1
-2
@@ -88,7 +88,7 @@ while ($device = mysql_fetch_array($device_query))
|
|||||||
#include("includes/discovery/os.inc.php");
|
#include("includes/discovery/os.inc.php");
|
||||||
|
|
||||||
include("includes/discovery/ports.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/processors.inc.php");
|
||||||
include("includes/discovery/mempools.inc.php");
|
include("includes/discovery/mempools.inc.php");
|
||||||
include("includes/discovery/ipv4-addresses.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/junose-atm-vp.inc.php");
|
||||||
include("includes/discovery/bgp-peers.inc.php");
|
include("includes/discovery/bgp-peers.inc.php");
|
||||||
include("includes/discovery/q-bridge-mib.inc.php");
|
include("includes/discovery/q-bridge-mib.inc.php");
|
||||||
|
|
||||||
include("includes/discovery/cisco-vlans.inc.php");
|
include("includes/discovery/cisco-vlans.inc.php");
|
||||||
include("includes/discovery/cisco-mac-accounting.inc.php");
|
include("includes/discovery/cisco-mac-accounting.inc.php");
|
||||||
include("includes/discovery/cisco-pw.inc.php");
|
include("includes/discovery/cisco-pw.inc.php");
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ function discover_juniAtmVp(&$exists, $interface_id, $vp_id, $vp_descr) {
|
|||||||
global $config; global $debug;
|
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")
|
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `juniAtmVp` WHERE `interface_id` = '".$interface_id."' AND `vp_id` = '".$vp_id."'"),0) == "0")
|
||||||
{
|
{
|
||||||
echo(".");
|
$sql = "INSERT INTO `juniAtmVp` (`interface_id`,`vp_id`,`vp_descr`) VALUES ('".$interface_id."','".$vp_id."','".$vp_descr."')";
|
||||||
} else {
|
|
||||||
$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 "); }
|
mysql_query($sql); echo("+"); if($debug) { echo($sql . " - " . mysql_affected_rows() . "inserted "); }
|
||||||
|
} else {
|
||||||
|
echo(".");
|
||||||
}
|
}
|
||||||
|
|
||||||
$exists[$interface_id][$vp_id] = 1;
|
$exists[$interface_id][$vp_id] = 1;
|
||||||
|
|||||||
@@ -27,5 +27,8 @@ $cpurrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/junose-cpu.rrd";
|
|||||||
#$cpu_usage = trim(shell_exec($cpu_cmd));
|
#$cpu_usage = trim(shell_exec($cpu_cmd));
|
||||||
|
|
||||||
include("hr-mib.inc.php");
|
include("hr-mib.inc.php");
|
||||||
|
include("junose-atm-vp.inc.php");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
Reference in New Issue
Block a user