diff --git a/html/includes/graphs/cempMemPool.inc.php b/html/includes/graphs/cempMemPool.inc.php
new file mode 100644
index 000000000..d7fe2a352
--- /dev/null
+++ b/html/includes/graphs/cempMemPool.inc.php
@@ -0,0 +1,35 @@
+
diff --git a/html/includes/graphs/cisco_entity_sensor.inc.php b/html/includes/graphs/cisco_entity_sensor.inc.php
new file mode 100644
index 000000000..b1ef33784
--- /dev/null
+++ b/html/includes/graphs/cisco_entity_sensor.inc.php
@@ -0,0 +1,25 @@
+
diff --git a/html/includes/graphs/common.inc.php b/html/includes/graphs/common.inc.php
index 28210d6f2..68b2d7ea7 100644
--- a/html/includes/graphs/common.inc.php
+++ b/html/includes/graphs/common.inc.php
@@ -1,12 +1,30 @@
diff --git a/html/includes/graphs/device_bits.inc.php b/html/includes/graphs/device_bits.inc.php
index d63b7caa7..3bf34bbf3 100644
--- a/html/includes/graphs/device_bits.inc.php
+++ b/html/includes/graphs/device_bits.inc.php
@@ -2,18 +2,24 @@
## Generate a list of interfaces and then call the multi_bits grapher to generate from the list
-$device = $_GET['device'];
-
+$device = mres($_GET['device']);
$hostname = gethostbyid($device);
+
$query = mysql_query("SELECT `ifIndex`,`interface_id` FROM `interfaces` WHERE `device_id` = '$device' AND `ifType` NOT LIKE '%oopback%' AND `ifType` NOT LIKE '%SVI%' AND `ifType` != 'l2vlan'");
-$pluses = "";
while($int = mysql_fetch_row($query)) {
if(is_file($config['rrd_dir'] . "/" . $hostname . "/" . $int[0] . ".rrd")) {
- $interfaces .= $seperator . $int[1];
- $seperator = ",";
+ $rrd_filenames[] = $config['rrd_dir'] . "/" . $hostname . "/" . $int[0] . ".rrd";
}
}
-include ("multi_bits.inc.php");
+$rra_in = "INOCTETS";
+$rra_out = "OUTOCTETS";
+
+$colour_line_in = "006600";
+$colour_line_out = "000099";
+$colour_area_in = "CDEB8B";
+$colour_area_out = "C3D9FF";
+
+include ("generic_multi_bits.inc.php");
?>
diff --git a/html/includes/graphs/device_cpu.inc.php b/html/includes/graphs/device_cpu.inc.php
new file mode 100644
index 000000000..ca509d4ca
--- /dev/null
+++ b/html/includes/graphs/device_cpu.inc.php
@@ -0,0 +1,7 @@
+
diff --git a/html/includes/graphs/device_cpu_ios.inc.php b/html/includes/graphs/device_cpu_ios.inc.php
new file mode 100644
index 000000000..2b707ee5d
--- /dev/null
+++ b/html/includes/graphs/device_cpu_ios.inc.php
@@ -0,0 +1,36 @@
+
diff --git a/html/includes/graphs/device_cpu_unix.inc.php b/html/includes/graphs/device_cpu_unix.inc.php
new file mode 100644
index 000000000..31ca5c005
--- /dev/null
+++ b/html/includes/graphs/device_cpu_unix.inc.php
@@ -0,0 +1,34 @@
+
diff --git a/html/includes/graphs/device_icmp.inc.php b/html/includes/graphs/device_icmp.inc.php
new file mode 100644
index 000000000..e98ee7739
--- /dev/null
+++ b/html/includes/graphs/device_icmp.inc.php
@@ -0,0 +1,51 @@
+
diff --git a/html/includes/graphs/device_ip.inc.php b/html/includes/graphs/device_ip.inc.php
new file mode 100644
index 000000000..3f1be9daa
--- /dev/null
+++ b/html/includes/graphs/device_ip.inc.php
@@ -0,0 +1,44 @@
+
diff --git a/html/includes/graphs/device_memory.inc.php b/html/includes/graphs/device_memory.inc.php
new file mode 100644
index 000000000..62a2de0c8
--- /dev/null
+++ b/html/includes/graphs/device_memory.inc.php
@@ -0,0 +1,3 @@
+
diff --git a/html/includes/graphs/device_memory_ios.inc.php b/html/includes/graphs/device_memory_ios.inc.php
new file mode 100644
index 000000000..f1cac1a6d
--- /dev/null
+++ b/html/includes/graphs/device_memory_ios.inc.php
@@ -0,0 +1,34 @@
+
diff --git a/html/includes/graphs/device_tcp.inc.php b/html/includes/graphs/device_tcp.inc.php
new file mode 100644
index 000000000..a0020f0c3
--- /dev/null
+++ b/html/includes/graphs/device_tcp.inc.php
@@ -0,0 +1,45 @@
+
diff --git a/html/includes/graphs/device_temperatures.inc.php b/html/includes/graphs/device_temperatures.inc.php
new file mode 100644
index 000000000..c84fd3e7e
--- /dev/null
+++ b/html/includes/graphs/device_temperatures.inc.php
@@ -0,0 +1,28 @@
+
diff --git a/html/includes/graphs/device_udp.inc.php b/html/includes/graphs/device_udp.inc.php
new file mode 100644
index 000000000..b49aba5c7
--- /dev/null
+++ b/html/includes/graphs/device_udp.inc.php
@@ -0,0 +1,31 @@
+
diff --git a/html/includes/graphs/device_uptime.inc.php b/html/includes/graphs/device_uptime.inc.php
new file mode 100644
index 000000000..8e9ce90e4
--- /dev/null
+++ b/html/includes/graphs/device_uptime.inc.php
@@ -0,0 +1,17 @@
+
diff --git a/html/includes/graphs/generic_bits.inc.php b/html/includes/graphs/generic_bits.inc.php
new file mode 100644
index 000000000..7a46246ac
--- /dev/null
+++ b/html/includes/graphs/generic_bits.inc.php
@@ -0,0 +1,54 @@
+ [ rrdtool graph $graphfile $rrd_options ] /n $rrd_filename");
+
+?>
diff --git a/html/includes/graphs/generic_duplex.inc.php b/html/includes/graphs/generic_duplex.inc.php
new file mode 100644
index 000000000..350616a3e
--- /dev/null
+++ b/html/includes/graphs/generic_duplex.inc.php
@@ -0,0 +1,68 @@
+
diff --git a/html/includes/graphs/generic_multi_bits.inc.php b/html/includes/graphs/generic_multi_bits.inc.php
new file mode 100644
index 000000000..d19d58f9a
--- /dev/null
+++ b/html/includes/graphs/generic_multi_bits.inc.php
@@ -0,0 +1,46 @@
+
diff --git a/html/includes/graphs/generic_multi_bits_separated.inc.php b/html/includes/graphs/generic_multi_bits_separated.inc.php
new file mode 100644
index 000000000..7ded1e2fc
--- /dev/null
+++ b/html/includes/graphs/generic_multi_bits_separated.inc.php
@@ -0,0 +1,46 @@
+
diff --git a/html/includes/graphs/generic_multi_line.inc.php b/html/includes/graphs/generic_multi_line.inc.php
new file mode 100644
index 000000000..af4e06eaf
--- /dev/null
+++ b/html/includes/graphs/generic_multi_line.inc.php
@@ -0,0 +1,33 @@
+
diff --git a/html/includes/graphs/generic_simplex.inc.php b/html/includes/graphs/generic_simplex.inc.php
new file mode 100644
index 000000000..b10740887
--- /dev/null
+++ b/html/includes/graphs/generic_simplex.inc.php
@@ -0,0 +1,46 @@
+
diff --git a/html/includes/graphs/mac_acc_bits.inc.php b/html/includes/graphs/mac_acc_bits.inc.php
index b0561a52d..f6050bfde 100644
--- a/html/includes/graphs/mac_acc_bits.inc.php
+++ b/html/includes/graphs/mac_acc_bits.inc.php
@@ -1,13 +1,16 @@
diff --git a/html/includes/graphs/mac_acc_pkts.inc.php b/html/includes/graphs/mac_acc_pkts.inc.php
new file mode 100644
index 000000000..2dea00dbd
--- /dev/null
+++ b/html/includes/graphs/mac_acc_pkts.inc.php
@@ -0,0 +1,27 @@
+
diff --git a/html/includes/graphs/mac_acc_total.inc.php b/html/includes/graphs/mac_acc_total.inc.php
index 288d3ecc6..bd47e62f2 100644
--- a/html/includes/graphs/mac_acc_total.inc.php
+++ b/html/includes/graphs/mac_acc_total.inc.php
@@ -1,76 +1,99 @@
diff --git a/html/includes/graphs/multi_bits.inc.php b/html/includes/graphs/multi_bits.inc.php
index 6cb0dcbf7..d92dda302 100644
--- a/html/includes/graphs/multi_bits.inc.php
+++ b/html/includes/graphs/multi_bits.inc.php
@@ -1,65 +1,27 @@
diff --git a/html/includes/graphs/pagp_bits.inc.php b/html/includes/graphs/pagp_bits.inc.php
index 048925964..489a7d7e2 100644
--- a/html/includes/graphs/pagp_bits.inc.php
+++ b/html/includes/graphs/pagp_bits.inc.php
@@ -2,20 +2,30 @@
## Generate a list of interfaces and then call the multi_bits grapher to generate from the list
-$parent = mysql_fetch_array(mysql_query("SELECT * FROM `interfaces` WHERE interface_id = '".$_GET['port']."'"));
+$parent = mysql_fetch_array(mysql_query("SELECT * FROM `interfaces` WHERE interface_id = '".mres($_GET['port'])."'"));
-$query = mysql_query("SELECT `ifIndex`,`interface_id` FROM `interfaces` WHERE `device_id` = '".$parent['device_id']."' AND `pagpGroupIfIndex` = '".$parent['ifIndex']."'");
+$query = mysql_query("SELECT * FROM `interfaces` WHERE `device_id` = '".$parent['device_id']."' AND `pagpGroupIfIndex` = '".$parent['ifIndex']."'");
-while($int = mysql_fetch_row($query)) {
- if(is_file($config['rrd_dir'] . "/" . $hostname . "/" . $int[0] . ".rrd")) {
- $interfaces .= $seperator . $int[1];
- $seperator = ",";
+$i=0;
+while($int = mysql_fetch_array($query)) {
+ if(is_file($config['rrd_dir'] . "/" . $hostname . "/" . $int['ifIndex'] . ".rrd")) {
+ $rrd_list[$i]['filename'] = $config['rrd_dir'] . "/" . $hostname . "/" . $int['ifIndex'] . ".rrd";
+ $rrd_list[$i]['descr'] = $int['ifDescr'];
+ $i++;
}
}
-$args['nototal'] = 1;
+$units='bps';
+$total_units='B';
+$colours_in='greens';
+$multiplier = "8";
+$colours_out = 'blues';
-include ("multi_bits_separate.inc.php");
+$nototal = 1;
+$rra_in = "INOCTETS";
+$rra_out = "OUTOCTETS";
+
+include ("generic_multi_bits_separated.inc.php");
diff --git a/html/includes/graphs/port_bits.inc.php b/html/includes/graphs/port_bits.inc.php
new file mode 100644
index 000000000..e664c5cce
--- /dev/null
+++ b/html/includes/graphs/port_bits.inc.php
@@ -0,0 +1,21 @@
+
diff --git a/html/includes/graphs/port_errors.inc.php b/html/includes/graphs/port_errors.inc.php
new file mode 100644
index 000000000..c3357b982
--- /dev/null
+++ b/html/includes/graphs/port_errors.inc.php
@@ -0,0 +1,33 @@
+
diff --git a/html/includes/graphs/port_nupkts.inc.php b/html/includes/graphs/port_nupkts.inc.php
new file mode 100644
index 000000000..c9d03245b
--- /dev/null
+++ b/html/includes/graphs/port_nupkts.inc.php
@@ -0,0 +1,33 @@
+
diff --git a/html/includes/graphs/port_upkts.inc.php b/html/includes/graphs/port_upkts.inc.php
new file mode 100644
index 000000000..925a87997
--- /dev/null
+++ b/html/includes/graphs/port_upkts.inc.php
@@ -0,0 +1,32 @@
+
diff --git a/html/includes/graphs/temperature.inc.php b/html/includes/graphs/temperature.inc.php
new file mode 100644
index 000000000..6fb6895dd
--- /dev/null
+++ b/html/includes/graphs/temperature.inc.php
@@ -0,0 +1,25 @@
+