mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fixes and advocent discovery
git-svn-id: http://www.observium.org/svn/observer/trunk@2712 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -58,12 +58,14 @@ $dur = $end - $start;
|
||||
$datefrom = date('Ymthis', $start);
|
||||
$dateto = date('Ymthis', $end);
|
||||
|
||||
$rate_data = getRates($bill_id,$datefrom,$dateto);
|
||||
#$rate_data = getRates($bill_id,$datefrom,$dateto);
|
||||
$rate_data = dbFetchRow("SELECT * from `bills` WHERE `bill_id`= ? LIMIT 1", array($bill_id));
|
||||
$rate_95th = $rate_data['rate_95th'] * 1000;
|
||||
$rate_average = $rate_data['rate_average'] * 1000;
|
||||
|
||||
$bi_a = dbFetchRow("SELECT * FROM bills WHERE bill_id = ?", array($bill_id));
|
||||
$bill_name = $bi_a['bill_name'];
|
||||
#$bi_a = dbFetchRow("SELECT * FROM bills WHERE bill_id = ?", array($bill_id));
|
||||
#$bill_name = $bi_a['bill_name'];
|
||||
$bill_name = $rate_data['bill_name'];
|
||||
|
||||
$dur = $end - $start;
|
||||
|
||||
|
@@ -37,11 +37,15 @@ if (bill_permitted($bill_id))
|
||||
$lastfrom = $day_data['2'];
|
||||
$lastto = $day_data['3'];
|
||||
|
||||
$rate_data = getRates($bill_id,$datefrom,$dateto);
|
||||
$rate_95th = $rate_data['rate_95th'];
|
||||
$dir_95th = $rate_data['dir_95th'];
|
||||
$total_data = $rate_data['total_data'];
|
||||
$rate_average = $rate_data['rate_average'];
|
||||
# $rate_data = getRates($bill_id,$datefrom,$dateto);
|
||||
# $rate_95th = $rate_data['rate_95th'];
|
||||
# $dir_95th = $rate_data['dir_95th'];
|
||||
# $total_data = $rate_data['total_data'];
|
||||
# $rate_average = $rate_data['rate_average'];
|
||||
$rate_95th = $bill_data['rate_95th'];
|
||||
$dir_95th = $bill_data['dir_95th'];
|
||||
$total_data = $bill_data['total_data'];
|
||||
$rate_average = $bill_data['rate_average'];
|
||||
|
||||
if ($rate_95th > $paid_kb)
|
||||
{
|
||||
|
9
includes/discovery/os/avocent.inc.php
Normal file
9
includes/discovery/os/avocent.inc.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
if (!$os)
|
||||
{
|
||||
if (preg_match("/^Avocent/", $sysDescr)) { $os = "avocent"; }
|
||||
if (preg_match("/^AlterPath/", $sysDescr)) { $os = "avocent"; }
|
||||
}
|
||||
|
||||
?>
|
10
includes/polling/os/avocent.inc.php
Normal file
10
includes/polling/os/avocent.inc.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
if (strstr($poll_device[sysDescr], "AlterPath")) {
|
||||
list($hardware, $version) = explode("-", trim(str_replace("version:", "", (str_replace("V_", "", $poll_device[sysDescr])))), 2);
|
||||
$hardware = trim($hardware);
|
||||
$version = trim($version);
|
||||
$features = trim(str_replace("#1", "", $version));
|
||||
}
|
||||
|
||||
?>
|
@@ -34,7 +34,6 @@ $config['os'][$os]['over'][2]['graph'] = "device_mempool";
|
||||
$config['os'][$os]['over'][2]['text'] = "Memory Usage";
|
||||
|
||||
|
||||
|
||||
### Linux-based OSes here please.
|
||||
|
||||
$os = "linux";
|
||||
@@ -67,6 +66,7 @@ $config['os'][$os]['over'][1]['text'] = "Processor Usage";
|
||||
$config['os'][$os]['over'][2]['graph'] = "device_mempool";
|
||||
$config['os'][$os]['over'][2]['text'] = "Memory Usage";
|
||||
|
||||
|
||||
### Other Unix-based OSes here please.
|
||||
|
||||
$os = "freebsd";
|
||||
@@ -775,6 +775,11 @@ $config['os'][$os]['over'][0]['graph'] = "device_current";
|
||||
$config['os'][$os]['over'][0]['text'] = "Current";
|
||||
$config['os'][$os]['icon'] = "tripplite";
|
||||
|
||||
$os = "avocent";
|
||||
$config['os'][$os]['text'] = "Avocent";
|
||||
$config['os'][$os]['type'] = "network";
|
||||
$config['os'][$os]['icon'] = "avocent";
|
||||
|
||||
$os = "symbol";
|
||||
$config['os'][$os]['type'] = "network";
|
||||
$config['os'][$os]['text'] = "Symbol AP";
|
||||
|
Reference in New Issue
Block a user