From 8b82c99ca9169156e3b5389e4475a07a896e92f9 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Thu, 3 Nov 2011 12:26:45 +0000 Subject: [PATCH] fixes and advocent discovery git-svn-id: http://www.observium.org/svn/observer/trunk@2712 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/billing-graph.php | 8 +++++--- html/pages/bill.inc.php | 14 +++++++++----- includes/discovery/os/avocent.inc.php | 9 +++++++++ includes/polling/os/avocent.inc.php | 10 ++++++++++ includes/static-config.php | 7 ++++++- 5 files changed, 39 insertions(+), 9 deletions(-) create mode 100644 includes/discovery/os/avocent.inc.php create mode 100644 includes/polling/os/avocent.inc.php diff --git a/html/billing-graph.php b/html/billing-graph.php index 32826ab18..0db6e181c 100755 --- a/html/billing-graph.php +++ b/html/billing-graph.php @@ -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; diff --git a/html/pages/bill.inc.php b/html/pages/bill.inc.php index 262865353..9de291862 100644 --- a/html/pages/bill.inc.php +++ b/html/pages/bill.inc.php @@ -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) { diff --git a/includes/discovery/os/avocent.inc.php b/includes/discovery/os/avocent.inc.php new file mode 100644 index 000000000..d22f39b5d --- /dev/null +++ b/includes/discovery/os/avocent.inc.php @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/includes/polling/os/avocent.inc.php b/includes/polling/os/avocent.inc.php new file mode 100644 index 000000000..a2898ae65 --- /dev/null +++ b/includes/polling/os/avocent.inc.php @@ -0,0 +1,10 @@ + diff --git a/includes/static-config.php b/includes/static-config.php index 1c2480250..3c16a377a 100644 --- a/includes/static-config.php +++ b/includes/static-config.php @@ -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";