Merge remote-tracking branch 'librenms/master' into dup-alerts

This commit is contained in:
root
2016-01-26 09:18:43 +01:00
24 changed files with 134 additions and 36 deletions
+18
View File
@@ -28,6 +28,8 @@
require_once 'includes/defaults.inc.php';
require_once 'config.php';
$options = getopt('d::');
$lock = false;
if (file_exists($config['install_dir'].'/.alerts.lock')) {
$pids = explode("\n", trim(`ps -e | grep php | awk '{print $1}'`));
@@ -48,6 +50,22 @@ require_once $config['install_dir'].'/includes/definitions.inc.php';
require_once $config['install_dir'].'/includes/functions.php';
require_once $config['install_dir'].'/includes/alerts.inc.php';
if (isset($options['d'])) {
echo "DEBUG!\n";
$debug = true;
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
ini_set('log_errors', 1);
ini_set('error_reporting', 1);
}
else {
$debug = false;
// ini_set('display_errors', 0);
ini_set('display_startup_errors', 0);
ini_set('log_errors', 0);
// ini_set('error_reporting', 0);
}
if (!defined('TEST') && $config['alert']['disable'] != 'true') {
echo 'Start: '.date('r')."\r\n";
echo "RunFollowUp():\r\n";
-1
View File
@@ -51,7 +51,6 @@ CREATE TABLE IF NOT EXISTS `users` ( `user_id` int(11) NOT NULL AUTO_INCREMENT,
CREATE TABLE IF NOT EXISTS `users_prefs` ( `user_id` int(16) NOT NULL, `pref` varchar(32) NOT NULL, `value` varchar(128) NOT NULL, PRIMARY KEY (`user_id`), UNIQUE KEY `user_id.pref` (`user_id`,`pref`), KEY `pref` (`pref`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `vlans` ( `vlan_id` int(11) NOT NULL AUTO_INCREMENT, `device_id` int(11) DEFAULT NULL, `vlan_vlan` int(11) DEFAULT NULL, `vlan_domain` text, `vlan_descr` text, PRIMARY KEY (`vlan_id`), KEY `device_id` (`device_id`,`vlan_vlan`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `vminfo` ( `id` int(11) NOT NULL AUTO_INCREMENT, `device_id` int(11) NOT NULL, `vm_type` varchar(16) NOT NULL DEFAULT 'vmware', `vmwVmVMID` int(11) NOT NULL, `vmwVmDisplayName` varchar(128) NOT NULL, `vmwVmGuestOS` varchar(128) NOT NULL, `vmwVmMemSize` int(11) NOT NULL, `vmwVmCpus` int(11) NOT NULL, `vmwVmState` varchar(128) NOT NULL, PRIMARY KEY (`id`), KEY `device_id` (`device_id`), KEY `vmwVmVMID` (`vmwVmVMID`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `vmware_vminfo` ( `id` int(11) NOT NULL AUTO_INCREMENT, `device_id` int(11) NOT NULL, `vmwVmVMID` int(11) NOT NULL, `vmwVmDisplayName` varchar(128) NOT NULL, `vmwVmGuestOS` varchar(128) NOT NULL, `vmwVmMemSize` int(11) NOT NULL, `vmwVmCpus` int(11) NOT NULL, `vmwVmState` varchar(128) NOT NULL, PRIMARY KEY (`id`), KEY `device_id` (`device_id`), KEY `vmwVmVMID` (`vmwVmVMID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `vrfs` ( `vrf_id` int(11) NOT NULL AUTO_INCREMENT, `vrf_oid` varchar(256) NOT NULL, `vrf_name` varchar(128) DEFAULT NULL, `mplsVpnVrfRouteDistinguisher` varchar(128) DEFAULT NULL, `mplsVpnVrfDescription` text NOT NULL, `device_id` int(11) NOT NULL, PRIMARY KEY (`vrf_id`), KEY `device_id` (`device_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `bill_history` ( `bill_hist_id` int(11) NOT NULL AUTO_INCREMENT, `bill_id` int(11) NOT NULL, `updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `bill_datefrom` datetime NOT NULL, `bill_dateto` datetime NOT NULL, `bill_type` text NOT NULL, `bill_allowed` bigint(20) NOT NULL, `bill_used` bigint(20) NOT NULL, `bill_overuse` bigint(20) NOT NULL, `bill_percent` decimal(10,2) NOT NULL, `rate_95th_in` bigint(20) NOT NULL, `rate_95th_out` bigint(20) NOT NULL, `rate_95th` bigint(20) NOT NULL, `dir_95th` varchar(3) NOT NULL, `rate_average` bigint(20) NOT NULL, `rate_average_in` bigint(20) NOT NULL, `rate_average_out` bigint(20) NOT NULL, `traf_in` bigint(20) NOT NULL, `traf_out` bigint(20) NOT NULL, `traf_total` bigint(20) NOT NULL, `pdf` longblob, PRIMARY KEY (`bill_hist_id`), UNIQUE KEY `unique_index` (`bill_id`,`bill_datefrom`,`bill_dateto`), KEY `bill_id` (`bill_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
CREATE TABLE IF NOT EXISTS `entPhysical_state` ( `device_id` int(11) NOT NULL, `entPhysicalIndex` varchar(64) NOT NULL, `subindex` varchar(64) DEFAULT NULL, `group` varchar(64) NOT NULL, `key` varchar(64) NOT NULL, `value` varchar(255) NOT NULL, KEY `device_id_index` (`device_id`,`entPhysicalIndex`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+1 -1
View File
@@ -42,7 +42,7 @@ if [ -z "$arg" ]; then
fi
cnf=$(echo $(grep '\[.distributed_poller.\]' config.php | egrep -v -e '^//' -e '^#' | cut -d = -f 2 | sed 's/;//g'))
cnd=${cnf,,}
cnf=${cnf,,}
if [ -z "$cnf" ] || [ "$cnf" == "0" ] || [ "$cnf" == "false" ]; then
# Call ourself again in case above pull changed or added something to daily.sh
$0 post-pull
+6 -2
View File
@@ -23,7 +23,7 @@ require 'includes/discovery/functions.inc.php';
$start = microtime(true);
$runtime_stats = array();
$sqlparams = array();
$options = getopt('h:m:i:n:d::a::q',array('os:','type:'));
$options = getopt('h:m:i:n:d::v::a::q',array('os:','type:'));
if (!isset($options['q'])) {
echo $config['project_name_version']." Discovery\n";
@@ -82,8 +82,11 @@ if (isset($options['i']) && $options['i'] && isset($options['n'])) {
$doing = $options['n'].'/'.$options['i'];
}
if (isset($options['d'])) {
if (isset($options['d']) || isset($options['v'])) {
echo "DEBUG!\n";
if (isset($options['v'])) {
$vdebug = true;
}
$debug = true;
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
@@ -111,6 +114,7 @@ if (!$where) {
echo "\n";
echo "Debugging and testing options:\n";
echo "-d Enable debugging output\n";
echo "-v Enable verbose debugging output\n";
echo "-m Specify single module to be run\n";
echo "\n";
echo "Invalid arguments!\n";
+42
View File
@@ -3,16 +3,58 @@
#### Bug fixes
- Discovery / Polling:
- Ignore HC Broadcast and Multicast counters for Cisco SB (PR2552)
- Fix Cisco temperature discovery (PR2765)
- WebUI:
- Fix ajax_search.php returning null instead of [] (PR2695)
- Fix notification links (PR2721)
- Fix wrong suggestion to install PEAR in Web installer (PR2727)
- Fixed mysqli support for Web installer (PR2730)
- Misc:
- Fix deleting device_perf entries (PR2755)
- Fix for schema updates to device table when poller is running (PR2825)
#### Improvements
- WebUI:
- Converted arp pages to use bootgrid (PR2669)
- Updated VMWare listing page (PR2684)
- Updated typeahead.js (PR2698)
- Added ability to set notes for ports (PR2688)
- Use browser width to scale CPU and Bandwidth graphs (PR2537, PR2633)
- Removed onClick from ports list (PR2744)
- Added support for showing sysName when hostname is IP (PR2796)
- Updated rancid support for different hostnames (PR2807)
- Added combined HTTP Auth and LDAP Auth authentication module (PR2835)
- Added ability to filter alerts using widgets (PR2834)
- Discovery / Polling:
- Print runtime info per poller/discovery modules (PR2713)
- Improved polling/discovery vmware module performance (PR2696)
- Added STP/RSTP support (PR2690)
- Moved system poller module to core module (PR2637)
- Added lookup of IP for devices with hostname (PR2798)
- Centralised sensors module file structure (PR2794)
- Graph poller module run times (PR2849)
- Updated vlan support using IEEE8021-Q-BRIDGE-MIB (PR2851)
- Added detection for:
- Added support for Samsung printers (PR2680)
- Added support for Canon printers (PR2687)
- Added support for Sub10 support (PR2469)
- Added support for Zyxel GS range (PR2729)
- Added support for HWGroup Poseidon (PR2742)
- Added support for Samsung SCX printers (PR2760)
- Added additional support for HP MSM (PR2766, PR2768)
- Added additional support for Cisco ASA and RouterOS (PR2784)
- Added support for Lenovo EMC Nas (PR2795)
- Added support for Infoblox (PR2801)
- API:
- Added support for Oxidized groups (PR2745)
- Misc:
- Added option to specify Smokeping ping value (PR2676)
- Added backend support for InfluxDB (PR2208)
- Alpha2 release of MIB Polling released (PR2536, PR2763)
- Centralised version info (PR2697)
- Added username support for libvirt over SSH (PR2728)
- Added Oxidized reload call when adding device (PR2792)
- Added components system to centralize data in MySQL (PR2623)
### December 2015
@@ -107,7 +107,6 @@ First, create and chown the `rrd` directory and create the `logs` directory:
mkdir rrd logs
chown -R librenms:librenms /opt/librenms
chown www-data:www-data logs
chmod 775 rrd
> NOTE: If you're not running Ubuntu or Debian, you will need to change `www-data` to the user and group which run the Apache web server.
@@ -265,12 +265,6 @@ First, create and chown the `rrd` directory and create the `logs` directory
mkdir rrd logs
chown -R librenms:librenms /opt/librenms
chmod 775 rrd
# For HTTPd (Apache):
chown apache:apache logs
# For Nginx:
chown nginx:nginx logs
```
> If you're planing on running rrdcached, make sure that the path is also chmod'ed to 775 and chown'ed to librenms:librenms.
@@ -108,7 +108,6 @@ First, create and chown the `rrd` directory and create the `logs` directory
mkdir rrd logs
chown -R librenms:librenms /opt/librenms
chown www-data:www-data logs
chmod 775 rrd
> NOTE: If you're planing on running rrdcached, make sure that the path is also chmod'ed to 775 and chown'ed to librenms:librenms.
Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

@@ -18,9 +18,9 @@ ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
function authenticate($username, $password) {
global $config, $ds;
if ($username && $ds) {
if ($ds) {
// bind with sAMAccountName instead of full LDAP DN
if (ldap_bind($ds, "{$username}@{$config['auth_ad_domain']}", $password)) {
if ($username && ldap_bind($ds, "{$username}@{$config['auth_ad_domain']}", $password)) {
// group membership in one of the configured groups is required
if (isset($config['auth_ad_require_groupmembership']) &&
$config['auth_ad_require_groupmembership'] > 0) {
+11 -2
View File
@@ -21,11 +21,20 @@ if ($device['disabled'] == '1') {
$type = strtolower($device['os']);
$image = getImage($device);
$host_id = dbFetchCell("SELECT `device_id` FROM `vminfo` WHERE `vmwVmDisplayName` = ? OR `vmwVmDisplayName` = ?", array($device['hostname'],$device['hostname'].'.'.$config['mydomain']));
echo '
<tr bgcolor="'.$device_colour.'" class="alert '.$class.'">
<td width="40" align=center valign=middle style="padding: 21px;"><span class="device_icon">'.$image.'</span></td>
<td valign=middle style="padding: 0 15px;"><span style="font-size: 20px;">'.generate_device_link($device).'</span>
<td><span class="device_icon">'.$image.'</span></td>
<td>';
if ($host_id > 0) {
echo '
<a href="'.generate_url(array('page'=>'device','device'=>$host_id)).'"><i class="fa fa-server fa-fw fa-lg"></i></a>
';
}
echo '
<span style="font-size: 20px;">'.generate_device_link($device).'</span>
<br />'.generate_link($device['location'], array('page' => 'devices', 'location' => $device['location'])).'</td>
<td>';
+2 -2
View File
@@ -40,8 +40,8 @@ $format .= $obj['timestamp']."\t";
$format .= $obj['hostname']."\t";
$format .= md5($obj['rule'])."\t"; //FIXME: Better entity
$format .= ($obj['state'] ? $obj['severity'] : "ok")."\t";
$format .= 0."\t";
$format .= 0."\t";
$format .= "0\t";
$format .= "0\t";
$format .= str_replace("\n","",nl2br($obj['msg']))."\t";
$format .= "NULL"; //FIXME: What's the HOSTPERFDATA equivalent for LibreNMS? Oo
$format .= "\n";
+1 -1
View File
@@ -59,7 +59,7 @@ if ($enabled == 1) {
'toner' => 'SELECT COUNT(`toner_id`) AS `total`,`toner_type` FROM `toner` GROUP BY `toner_type`',
'vlans' => 'SELECT COUNT(`vlan_id`) AS `total`,`vlan_type` FROM `vlans` GROUP BY `vlan_type`',
'vminfo' => 'SELECT COUNT(`id`) AS `total`,`vm_type` FROM `vminfo` GROUP BY `vm_type`',
'vmware' => 'SELECT COUNT(`id`) AS `total` FROM `vmware_vminfo`',
'vmware' => 'SELECT COUNT(`id`) AS `total` FROM `vminfo`',
'vrfs' => 'SELECT COUNT(`vrf_id`) AS `total` FROM `vrfs`',
'mysql_version' => 'SELECT 1 AS `total`, @@version AS `version`',
);
+18 -2
View File
@@ -33,9 +33,25 @@ function format_number_short($number, $sf) {
}
function external_exec($command) {
d_echo($command."\n");
global $debug,$vdebug;
if ($debug && !$vdebug) {
$debug_command = preg_replace('/-c [\S]+/','-c COMMUNITY',$command);
$debug_command = preg_replace('/(udp|udp6|tcp|tcp6):(.*):([\d]+)/','\1:HOSTNAME:\3',$debug_command);
d_echo($debug_command);
}
elseif ($vdebug) {
d_echo($command."\n");
}
$output = shell_exec($command);
d_echo($output."\n");
if ($debug && !$vdebug) {
$debug_output = preg_replace('/(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/', '*', $output);
d_echo("$debug_output\n");
}
elseif ($vdebug) {
d_echo($output."\n");
}
return $output;
}
+8
View File
@@ -1178,6 +1178,14 @@ $config['os'][$os]['type'] = 'printer';
$config['os'][$os]['over'][0]['graph'] = 'device_toner';
$config['os'][$os]['over'][0]['text'] = 'Toner';
$os ='lexmarkprinter';
$config['os'][$os]['group'] = 'printer';
$config['os'][$os]['text'] = 'Lexmark Printer';
$config['os'][$os]['type'] = 'printer';
$config['os'][$os]['icon'] = 'lexmark';
$config['os'][$os]['over'][0]['graph'] = 'device_toner';
$config['os'][$os]['over'][0]['text'] = 'Toner';
$os = '3com';
$config['os'][$os]['text'] = '3Com';
$config['os'][$os]['over'][0]['graph'] = 'device_bits';
@@ -0,0 +1,6 @@
<?php
if (!$os) {
if (strstr($sysDescr, 'Lexmark ')) {
$os = 'lexmarkprinter';
}
}
@@ -1,14 +1,14 @@
<?php
echo 'Q-BRIDGE-MIB VLANs : ';
echo 'IEEE8021-Q-BRIDGE-MIB VLANs : ';
$vlanversion = snmp_get($device, 'dot1qVlanVersionNumber.0', '-Oqv', 'Q-BRIDGE-MIB');
$vlanversion = snmp_get($device, 'dot1qVlanVersionNumber.0', '-Oqv', 'IEEE8021-Q-BRIDGE-MIB');
if ($vlanversion == 'version1') {
if ($vlanversion == 'version1' || $vlanversion == '2' ) {
echo "VLAN $vlanversion ";
$vtpdomain_id = '1';
$vlans = snmpwalk_cache_oid($device, 'dot1qVlanStaticName', array(), 'Q-BRIDGE-MIB');
$vlans = snmpwalk_cache_oid($device, 'dot1qVlanStaticName', array(), 'IEEE8021-Q-BRIDGE-MIB');
foreach ($vlans as $vlan_id => $vlan) {
echo " $vlan_id";
@@ -0,0 +1,4 @@
<?php
preg_match('/^Lexmark ([a-zA-Z0-9]+) version/', $poll_device['sysDescr'], $result);
$hardware = $result[1];
+3 -3
View File
@@ -745,7 +745,7 @@ function snmp_cache_portName($device, $array) {
function snmp_gen_auth(&$device) {
global $debug;
global $debug, $vdebug;
$cmd = '';
@@ -781,11 +781,11 @@ function snmp_gen_auth(&$device) {
}
else {
if ($debug) {
print 'DEBUG: '.$device['snmpver']." : Unsupported SNMP Version (wtf have you done ?)\n";
print 'DEBUG: '.$device['snmpver']." : Unsupported SNMP Version (shouldn't be possible to get here)\n";
}
}//end if
if ($debug) {
if ($vdebug) {
print "DEBUG: SNMP Auth options = $cmd\n";
}
+6 -2
View File
@@ -33,7 +33,7 @@ echo "MySQL: ".$versions['mysql_ver']."\n";
echo "RRDTool: ".$versions['rrdtool_ver']."\n";
echo "SNMP: ".$versions['netsnmp_ver']."\n";
$options = getopt('h:m:i:n:r::d::a::f::');
$options = getopt('h:m:i:n:r::d::v::a::f::');
if ($options['h'] == 'odd') {
$options['n'] = '1';
@@ -83,14 +83,18 @@ if (!$where) {
echo "-r Do not create or update RRDs\n";
echo "-f Do not insert data into InfluxDB\n";
echo "-d Enable debugging output\n";
echo "-d Enable verbose debugging output\n";
echo "-m Specify module(s) to be run\n";
echo "\n";
echo "No polling type specified!\n";
exit;
}
if (isset($options['d'])) {
if (isset($options['d']) || isset($options['v'])) {
echo "DEBUG!\n";
if (isset($options['v'])) {
$vdebug = true;
}
$debug = true;
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
-1
View File
@@ -51,7 +51,6 @@ CREATE TABLE IF NOT EXISTS `users` ( `user_id` int(11) NOT NULL AUTO_INCREMENT,
CREATE TABLE IF NOT EXISTS `users_prefs` ( `user_id` int(16) NOT NULL, `pref` varchar(32) NOT NULL, `value` varchar(128) NOT NULL, PRIMARY KEY (`user_id`), UNIQUE KEY `user_id.pref` (`user_id`,`pref`), KEY `pref` (`pref`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `vlans` ( `vlan_id` int(11) NOT NULL AUTO_INCREMENT, `device_id` int(11) DEFAULT NULL, `vlan_vlan` int(11) DEFAULT NULL, `vlan_domain` text, `vlan_descr` text, PRIMARY KEY (`vlan_id`), KEY `device_id` (`device_id`,`vlan_vlan`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `vminfo` ( `id` int(11) NOT NULL AUTO_INCREMENT, `device_id` int(11) NOT NULL, `vm_type` varchar(16) NOT NULL DEFAULT 'vmware', `vmwVmVMID` int(11) NOT NULL, `vmwVmDisplayName` varchar(128) NOT NULL, `vmwVmGuestOS` varchar(128) NOT NULL, `vmwVmMemSize` int(11) NOT NULL, `vmwVmCpus` int(11) NOT NULL, `vmwVmState` varchar(128) NOT NULL, PRIMARY KEY (`id`), KEY `device_id` (`device_id`), KEY `vmwVmVMID` (`vmwVmVMID`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `vmware_vminfo` ( `id` int(11) NOT NULL AUTO_INCREMENT, `device_id` int(11) NOT NULL, `vmwVmVMID` int(11) NOT NULL, `vmwVmDisplayName` varchar(128) NOT NULL, `vmwVmGuestOS` varchar(128) NOT NULL, `vmwVmMemSize` int(11) NOT NULL, `vmwVmCpus` int(11) NOT NULL, `vmwVmState` varchar(128) NOT NULL, PRIMARY KEY (`id`), KEY `device_id` (`device_id`), KEY `vmwVmVMID` (`vmwVmVMID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `vrfs` ( `vrf_id` int(11) NOT NULL AUTO_INCREMENT, `vrf_oid` varchar(256) NOT NULL, `vrf_name` varchar(128) DEFAULT NULL, `mplsVpnVrfRouteDistinguisher` varchar(128) DEFAULT NULL, `mplsVpnVrfDescription` text NOT NULL, `device_id` int(11) NOT NULL, PRIMARY KEY (`vrf_id`), KEY `device_id` (`device_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `bill_history` ( `bill_hist_id` int(11) NOT NULL AUTO_INCREMENT, `bill_id` int(11) NOT NULL, `updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `bill_datefrom` datetime NOT NULL, `bill_dateto` datetime NOT NULL, `bill_type` text NOT NULL, `bill_allowed` bigint(20) NOT NULL, `bill_used` bigint(20) NOT NULL, `bill_overuse` bigint(20) NOT NULL, `bill_percent` decimal(10,2) NOT NULL, `rate_95th_in` bigint(20) NOT NULL, `rate_95th_out` bigint(20) NOT NULL, `rate_95th` bigint(20) NOT NULL, `dir_95th` varchar(3) NOT NULL, `rate_average` bigint(20) NOT NULL, `rate_average_in` bigint(20) NOT NULL, `rate_average_out` bigint(20) NOT NULL, `traf_in` bigint(20) NOT NULL, `traf_out` bigint(20) NOT NULL, `traf_total` bigint(20) NOT NULL, `pdf` longblob, PRIMARY KEY (`bill_hist_id`), UNIQUE KEY `unique_index` (`bill_id`,`bill_datefrom`,`bill_dateto`), KEY `bill_id` (`bill_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
CREATE TABLE IF NOT EXISTS `entPhysical_state` ( `device_id` int(11) NOT NULL, `entPhysicalIndex` varchar(64) NOT NULL, `subindex` varchar(64) DEFAULT NULL, `group` varchar(64) NOT NULL, `key` varchar(64) NOT NULL, `value` varchar(255) NOT NULL, KEY `device_id_index` (`device_id`,`entPhysicalIndex`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-3
View File
@@ -28,10 +28,7 @@ ALTER TABLE sensors MODIFY sensor_descr VARCHAR(255);
ALTER TABLE `vrfs` MODIFY `mplsVpnVrfRouteDistinguisher` VARCHAR(128);
ALTER TABLE `vrfs` MODIFY `vrf_name` VARCHAR(128);
ALTER TABLE `ports` MODIFY `ifDescr` VARCHAR(255);
CREATE TABLE IF NOT EXISTS `vminfo` (`id` int(11) NOT NULL AUTO_INCREMENT, `device_id` int(11) NOT NULL, `vmwVmVMID` int(11) NOT NULL, `vmwVmDisplayName` varchar(128) NOT NULL, `vmwVmGuestOS` varchar(128) NOT NULL, `vmwVmMemSize` int(11) NOT NULL, `vmwVmCpus` int(11) NOT NULL, `vmwVmState` varchar(128) NOT NULL, PRIMARY KEY (`id`), KEY `device_id` (`device_id`), KEY `vmwVmVMID` (`vmwVmVMID`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE `ports` MODIFY `port_descr_type` VARCHAR(255);
RENAME TABLE `vmware_vminfo` TO `vminfo` ;
ALTER TABLE `vminfo` ADD `vm_type` VARCHAR(16) NOT NULL DEFAULT 'vmware' AFTER `device_id`;
CREATE TABLE IF NOT EXISTS `cef_switching` ( `device_id` int(11) NOT NULL, `entPhysicalIndex` int(11) NOT NULL, `afi` varchar(4) COLLATE utf8_unicode_ci NOT NULL, `cef_index` int(11) NOT NULL, `cef_path` varchar(16) COLLATE utf8_unicode_ci NOT NULL, `drop` int(11) NOT NULL, `punt` int(11) NOT NULL, `punt2host` int(11) NOT NULL, `drop_prev` int(11) NOT NULL, `punt_prev` int(11) NOT NULL, `punt2host_prev` int(11) NOT NULL,`updated` INT NOT NULL , `updated_prev` INT NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE `mac_accounting` CHANGE `peer_mac` `mac` VARCHAR( 32 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL;
ALTER TABLE `mac_accounting` DROP `peer_ip`, DROP `peer_desc`, DROP `peer_asn`;
+1
View File
@@ -0,0 +1 @@
DROP TABLE IF EXISTS `vmware_vminfo`;
+1 -2
View File
@@ -104,8 +104,7 @@ if (class_exists('Net_IPv6') === false) {
if (isset($config['user'])) {
$tmp_user = $config['user'];
$tmp_dir = $config['install_dir'];
$tmp_log = $config['log_dir'];
$find_result = rtrim(`find $tmp_dir \! -user $tmp_user -not -path $tmp_log`);
$find_result = rtrim(`find $tmp_dir \! -user $tmp_user`);
if (!empty($find_result)) {
// This isn't just the log directory, let's print the list to the user
$files = explode(PHP_EOL, $find_result);