diff --git a/html/includes/graphs/device/vpdn_sessions_l2tp.inc.php b/html/includes/graphs/device/vpdn_sessions_l2tp.inc.php
new file mode 100644
index 000000000..2f3723a6b
--- /dev/null
+++ b/html/includes/graphs/device/vpdn_sessions_l2tp.inc.php
@@ -0,0 +1,25 @@
+
diff --git a/html/includes/graphs/device/vpdn_tunnels_l2tp.inc.php b/html/includes/graphs/device/vpdn_tunnels_l2tp.inc.php
new file mode 100644
index 000000000..7517b89aa
--- /dev/null
+++ b/html/includes/graphs/device/vpdn_tunnels_l2tp.inc.php
@@ -0,0 +1,25 @@
+
diff --git a/includes/defaults.inc.php b/includes/defaults.inc.php
index fa8c0a592..39c2e68c0 100644
--- a/includes/defaults.inc.php
+++ b/includes/defaults.inc.php
@@ -360,6 +360,7 @@ $config['poller_modules']['cisco-remote-access-monitor'] = 1;
$config['poller_modules']['cisco-cef'] = 1;
$config['poller_modules']['cisco-mac-accounting'] = 1;
$config['poller_modules']['cipsec-tunnels'] = 1;
+$config['poller_modules']['cisco-vpdn'] = 1;
$config['poller_modules']['entity-physical'] = 1;
diff --git a/includes/polling/cisco-vpdn.inc.php b/includes/polling/cisco-vpdn.inc.php
new file mode 100755
index 000000000..af3c4df6e
--- /dev/null
+++ b/includes/polling/cisco-vpdn.inc.php
@@ -0,0 +1,59 @@
+ $vpdn)
+ {
+
+ $rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename("vpdn-".$type.".rrd");
+ $rrd_create = " DS:tunnels:GAUGE:600:0:U";
+ $rrd_create .= " DS:sessions:GAUGE:600:0:U";
+ $rrd_create .= " DS:denied:COUNTER:600:0:100000";
+ $rrd_create .= " RRA:AVERAGE:0.5:1:1200";
+ $rrd_create .= " RRA:AVERAGE:0.5:1:2000";
+ $rrd_create .= " RRA:AVERAGE:0.5:6:2000";
+ $rrd_create .= " RRA:AVERAGE:0.5:24:2000";
+ $rrd_create .= " RRA:AVERAGE:0.5:288:2000";
+ $rrd_create .= " RRA:MAX:0.5:1:1200";
+ $rrd_create .= " RRA:MAX:0.5:6:2000";
+ $rrd_create .= " RRA:MAX:0.5:24:2000";
+ $rrd_create .= " RRA:MAX:0.5:288:2000";
+ $rrd_create .= " RRA:MIN:0.5:1:1200";
+ $rrd_create .= " RRA:MIN:0.5:6:2000";
+ $rrd_create .= " RRA:MIN:0.5:24:2000";
+ $rrd_create .= " RRA:MIN:0.5:288:2000";
+
+ if (is_file($rrd_filename) || $vpdn['cvpdnSystemTunnelTotal'] || $vpdn['cvpdnSystemSessionTotal'])
+ {
+ if (!file_exists($rrd_filename))
+ {
+ rrdtool_create($rrd_filename, $rrd_create);
+ }
+
+ $rrd_update = "N";
+ $rrd_update .= ":".$vpdn['cvpdnSystemTunnelTotal'];
+ $rrd_update .= ":".$vpdn['cvpdnSystemSessionTotal'];
+ $rrd_update .= ":".$vpdn['cvpdnSystemDeniedUsersTotal'];
+
+ rrdtool_update($rrd_filename, $rrd_update);
+
+ $graphs['vpdn_sessions_'.$type] = TRUE;
+ $graphs['vpdn_tunnels_'.$type] = TRUE;
+
+ echo(" Cisco VPDN ($type) ");
+ }
+ }
+ unset($data, $vpdn, $type, $rrd_filename, $rrd_create, $rrd_update);
+}
+
+?>
diff --git a/includes/polling/functions.inc.php b/includes/polling/functions.inc.php
index d43afecde..266d43240 100644
--- a/includes/polling/functions.inc.php
+++ b/includes/polling/functions.inc.php
@@ -168,6 +168,8 @@ function poll_device($device, $options)
### If there any don't match, they're added/deleted from the database.
### Ideally we should hold graphs for xx days/weeks/polls so that we don't needlessly hide information.
+ print_r($graphs);
+
foreach (dbFetch("SELECT `graph` FROM `device_graphs` WHERE `device_id` = ?", array($device['device_id'])) as $graph)
{
if (!isset($graphs[$graph["graph"]]))
diff --git a/includes/static-config.php b/includes/static-config.php
index 67a65d28b..4497e94e7 100644
--- a/includes/static-config.php
+++ b/includes/static-config.php
@@ -804,7 +804,7 @@ foreach ($config['os'] as $this_os => $blah)
### Graph Types
-$config['graph_sections'] = array('system', 'firewall', 'netstats', 'wireless', 'storage');
+$config['graph_sections'] = array('system', 'firewall', 'netstats', 'wireless', 'storage', 'vpdn');
$config['graph_types']['device']['wifi_clients']['section'] = 'wireless';
$config['graph_types']['device']['wifi_clients']['order'] = '0';
@@ -919,6 +919,15 @@ $config['graph_types']['device']['uptime']['section'] = 'system';
$config['graph_types']['device']['uptime']['order'] = '0';
$config['graph_types']['device']['uptime']['descr'] = 'System Uptime';
+$config['graph_types']['device']['vpdn_sessions_l2tp']['section'] = 'vpdn';
+$config['graph_types']['device']['vpdn_sessions_l2tp']['order'] = '0';
+$config['graph_types']['device']['vpdn_sessions_l2tp']['descr'] = 'VPDN L2TP Sessions';
+
+$config['graph_types']['device']['vpdn_tunnels_l2tp']['section'] = 'vpdn';
+$config['graph_types']['device']['vpdn_tunnels_l2tp']['order'] = '0';
+$config['graph_types']['device']['vpdn_tunnels_l2tp']['descr'] = 'VPDN L2TP Tunnels';
+
+
### Device Types
$i = 0;