From 8df2b9b3f5795380c7ec4c6f89b4cd2bdb8f6488 Mon Sep 17 00:00:00 2001 From: Tom Laermans Date: Sun, 6 May 2012 18:38:11 +0000 Subject: [PATCH] remove legacy variables, hopefully i didn't mess anything up git-svn-id: http://www.observium.org/svn/observer/trunk@3134 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/includes/device-header.inc.php | 4 +- html/includes/print-vlan.inc.php | 4 +- html/includes/print-vrf.inc.php | 4 +- html/index.php | 8 - html/pages/apps/default.inc.php | 75 +- html/pages/apps/overview.inc.php | 2 +- html/pages/device/apps/apache.inc.php | 2 +- html/pages/device/apps/drbd.inc.php | 2 +- html/pages/device/apps/mailscanner.inc.php | 2 +- html/pages/device/apps/memcached.inc.php | 2 +- html/pages/device/apps/mysql.inc.php | 2 +- html/pages/device/apps/nginx.inc.php | 2 +- html/pages/device/apps/ntp-client.inc.php | 2 +- html/pages/device/apps/ntpd-server.inc.php | 2 +- html/pages/device/apps/powerdns.inc.php | 2 +- html/pages/device/apps/shoutcast.inc.php | 4 +- html/pages/device/health/mempool.inc.php | 6 +- html/pages/device/health/processor.inc.php | 4 +- html/pages/device/health/storage.inc.php | 2 +- html/pages/device/hrdevice.inc.php | 10 +- html/pages/device/overview/c6kxbar.inc.php | 4 +- .../device/overview/generic/sensor.inc.php | 2 +- html/pages/device/overview/mempools.inc.php | 4 +- html/pages/device/overview/ports.inc.php | 4 +- html/pages/device/overview/processors.inc.php | 4 +- html/pages/device/overview/storage.inc.php | 4 +- html/pages/device/overview/toner.inc.php | 4 +- html/pages/device/port/junose-atm-vp.inc.php | 2 +- html/pages/device/port/macaccounting.inc.php | 6 +- html/pages/device/port/pagp.inc.php | 16 +- html/pages/device/ports.inc.php | 4 +- html/pages/device/pseudowires.inc.php | 8 +- html/pages/device/routing/bgp.inc.php | 4 +- html/pages/device/routing/cef.inc.php | 2 +- html/pages/device/services.inc.php | 2 +- html/pages/front/default.php | 2 +- html/pages/front/demo.php | 4 +- html/pages/front/example2.php | 12 +- html/pages/front/jt.php | 42 +- html/pages/front/traffic.php | 36 +- html/pages/graphs.inc.php | 2 +- html/pages/health/mempool.inc.php | 20 +- html/pages/health/processor.inc.php | 20 +- html/pages/health/sensors.inc.php | 28 +- html/pages/ports/graph.inc.php | 4 +- html/pages/pseudowires.inc.php | 8 +- html/pages/routing/bgp.inc.php | 6 +- html/pages/routing/vrf.inc.php | 4 +- html/pages/services.inc.php | 2 +- includes/discovery/bgp-peers.inc.php | 9 +- includes/static-config.php | 9 - mibs/ASTERISK-MIB | 739 ++++++++++++++++++ mibs/DIGIUM-MIB | 17 + 53 files changed, 963 insertions(+), 212 deletions(-) create mode 100644 mibs/ASTERISK-MIB create mode 100644 mibs/DIGIUM-MIB diff --git a/html/includes/device-header.inc.php b/html/includes/device-header.inc.php index 931354dfb..2c8131318 100644 --- a/html/includes/device-header.inc.php +++ b/html/includes/device-header.inc.php @@ -40,10 +40,10 @@ echo(' $graph_array['height'] = "100"; $graph_array['width'] = "310"; - $graph_array['to'] = $now; + $graph_array['to'] = $config['time']['now']; $graph_array['id'] = $device['device_id']; $graph_array['type'] = "device_bits"; - $graph_array['from'] = $day; + $graph_array['from'] = $config['time']['day']; $graph_array['legend'] = "no"; $graph_array['popup_title'] = $descr; # $graph_array['link'] = generate_device_link($device_id); diff --git a/html/includes/print-vlan.inc.php b/html/includes/print-vlan.inc.php index 61b937378..abd3c1f07 100644 --- a/html/includes/print-vlan.inc.php +++ b/html/includes/print-vlan.inc.php @@ -31,9 +31,9 @@ foreach ($vlan_ports as $port) ".$device['hostname']." - ".$port['ifDescr']."\ ".$port['ifAlias']." \ - \ + \ ', CENTER, LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 150);\" onmouseout=\"return nd();\" >". - " + "
".truncate(short_port_descr($port['ifAlias']), 22, '')."
"); diff --git a/html/includes/print-vrf.inc.php b/html/includes/print-vrf.inc.php index d84cf2b74..4548e6dd4 100644 --- a/html/includes/print-vrf.inc.php +++ b/html/includes/print-vrf.inc.php @@ -19,9 +19,9 @@ foreach (dbFetchRows("SELECT * FROM ports WHERE `device_id` = ? AND `ifVrf` = ?" ".$device['hostname']." - ".$port['ifDescr']."\ ".$port['ifAlias']." \ - \ + \ ', CENTER, LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 150);\" onmouseout=\"return nd();\" >". - " + "
".truncate(short_port_descr($port['ifAlias']), 22, '')."
"); diff --git a/html/index.php b/html/index.php index 4cfe01f0c..c17b5020a 100755 --- a/html/index.php +++ b/html/index.php @@ -100,14 +100,6 @@ include("includes/authenticate.inc.php"); if (strstr($_SERVER['REQUEST_URI'], 'widescreen=yes')) { $_SESSION['widescreen'] = 1; } if (strstr($_SERVER['REQUEST_URI'], 'widescreen=no')) { unset($_SESSION['widescreen']); } -$now = time(); -$fourhour = time() - (4 * 60 * 60); -$day = time() - (24 * 60 * 60); -$twoday = time() - (2 * 24 * 60 * 60); -$week = time() - (7 * 24 * 60 * 60); -$month = time() - (31 * 24 * 60 * 60); -$year = time() - (365 * 24 * 60 * 60); - # Load the settings for Multi-Tenancy. if (isset($config['branding']) && is_array($config['branding'])) { diff --git a/html/pages/apps/default.inc.php b/html/pages/apps/default.inc.php index 76fc1d0d4..8bf2fd8be 100644 --- a/html/pages/apps/default.inc.php +++ b/html/pages/apps/default.inc.php @@ -1,45 +1,46 @@ '.$vars['app'].''); - echo(''); - $app_devices = dbFetchRows("SELECT * FROM `devices` AS D, `applications` AS A WHERE D.device_id = A.device_id AND A.app_type = ?", array($vars['app'])); - foreach ($app_devices as $app_device) - { - echo(''); - echo(''); - echo(''); - echo(''); - echo(''); - echo(''); - echo(''); - echo(''); + echo(''); +} + +echo('
'.generate_device_link($app_device, shorthost($app_device['hostname']), array('tab'=>'apps','app'=>$vars['app'])).''.$app_device['app_instance'].''.$app_device['app_status'].'
'); +echo('

'.$vars['app'].'

'); +echo(''); +$app_devices = dbFetchRows("SELECT * FROM `devices` AS D, `applications` AS A WHERE D.device_id = A.device_id AND A.app_type = ?", array($vars['app'])); +foreach ($app_devices as $app_device) +{ + echo(''); + echo(''); + echo(''); + echo(''); + echo(''); + echo(''); + echo(''); + echo(''); - echo(''); - } - echo('
'.generate_device_link($app_device, shorthost($app_device['hostname']), array('tab'=>'apps','app'=>$vars['app'])).''.$app_device['app_instance'].''.$app_device['app_status'].'
'); - foreach ($graphs[$vars['app']] as $graph_type) - { - $graph_array['type'] = "application_".$vars['app']."_".$graph_type; - $graph_array['id'] = $app_device['app_id']; - $graph_array_zoom['type'] = "application_".$vars['app']."_".$graph_type; - $graph_array_zoom['id'] = $app_device['app_id']; + foreach ($graphs[$vars['app']] as $graph_type) + { + $graph_array['type'] = "application_".$vars['app']."_".$graph_type; + $graph_array['id'] = $app_device['app_id']; + $graph_array_zoom['type'] = "application_".$vars['app']."_".$graph_type; + $graph_array_zoom['id'] = $app_device['app_id']; - $link_array = $graph_array; - $link_array['page'] = "graphs"; - unset($link_array['height'], $link_array['width']); - $link = generate_url($link_array); + $link_array = $graph_array; + $link_array['page'] = "graphs"; + unset($link_array['height'], $link_array['width']); + $link = generate_url($link_array); - echo(overlib_link($link, generate_graph_tag($graph_array), generate_graph_tag($graph_array_zoom), NULL)); - } - echo('
'); + echo(overlib_link($link, generate_graph_tag($graph_array), generate_graph_tag($graph_array_zoom), NULL)); + } + echo('
'); ?> diff --git a/html/pages/apps/overview.inc.php b/html/pages/apps/overview.inc.php index b3d3db96f..0fbde3c5e 100644 --- a/html/pages/apps/overview.inc.php +++ b/html/pages/apps/overview.inc.php @@ -2,7 +2,7 @@ $graph_array['height'] = "100"; $graph_array['width'] = "218"; -$graph_array['to'] = $now; +$graph_array['to'] = $config['time']['now']; $graph_array['from'] = $config['time']['day']; $graph_array_zoom = $graph_array; $graph_array_zoom['height'] = "150"; diff --git a/html/pages/device/apps/apache.inc.php b/html/pages/device/apps/apache.inc.php index 8f7b3dc08..7715051e2 100644 --- a/html/pages/device/apps/apache.inc.php +++ b/html/pages/device/apps/apache.inc.php @@ -13,7 +13,7 @@ foreach ($graphs as $key => $text) $graph_array['height'] = "100"; $graph_array['width'] = "215"; - $graph_array['to'] = $now; + $graph_array['to'] = $config['time']['now']; $graph_array['id'] = $app['app_id']; $graph_array['type'] = "application_".$key; diff --git a/html/pages/device/apps/drbd.inc.php b/html/pages/device/apps/drbd.inc.php index 2aab8315f..36af19ddf 100644 --- a/html/pages/device/apps/drbd.inc.php +++ b/html/pages/device/apps/drbd.inc.php @@ -12,7 +12,7 @@ foreach ($graphs as $key => $text) $graph_array['height'] = "100"; $graph_array['width'] = "215"; - $graph_array['to'] = $now; + $graph_array['to'] = $config['time']['now']; $graph_array['id'] = $app['app_id']; $graph_array['type'] = "application_".$key; diff --git a/html/pages/device/apps/mailscanner.inc.php b/html/pages/device/apps/mailscanner.inc.php index 217bc57f5..231886f9c 100644 --- a/html/pages/device/apps/mailscanner.inc.php +++ b/html/pages/device/apps/mailscanner.inc.php @@ -11,7 +11,7 @@ foreach ($graphs as $key => $text) $graph_type = $key; $graph_array['height'] = "100"; $graph_array['width'] = "215"; - $graph_array['to'] = $now; + $graph_array['to'] = $config['time']['now']; $graph_array['id'] = $app['app_id']; $graph_array['type'] = "application_".$key; diff --git a/html/pages/device/apps/memcached.inc.php b/html/pages/device/apps/memcached.inc.php index 28aaeaa41..7b7c71540 100644 --- a/html/pages/device/apps/memcached.inc.php +++ b/html/pages/device/apps/memcached.inc.php @@ -16,7 +16,7 @@ foreach ($graphs as $key => $text) $graph_array['height'] = "100"; $graph_array['width'] = "215"; - $graph_array['to'] = $now; + $graph_array['to'] = $config['time']['now']; $graph_array['id'] = $app['app_id']; $graph_array['type'] = "application_".$key; diff --git a/html/pages/device/apps/mysql.inc.php b/html/pages/device/apps/mysql.inc.php index f5311adf8..ddd8f7df0 100644 --- a/html/pages/device/apps/mysql.inc.php +++ b/html/pages/device/apps/mysql.inc.php @@ -61,7 +61,7 @@ foreach ($graphs[$vars['app_section']] as $key => $text) $graph_type = $key; $graph_array['height'] = "100"; $graph_array['width'] = "215"; - $graph_array['to'] = $now; + $graph_array['to'] = $config['time']['now']; $graph_array['id'] = $app['app_id']; $graph_array['type'] = "application_".$key; echo('

'.$text.'

'); diff --git a/html/pages/device/apps/nginx.inc.php b/html/pages/device/apps/nginx.inc.php index d166d4fcf..a1d3d2506 100644 --- a/html/pages/device/apps/nginx.inc.php +++ b/html/pages/device/apps/nginx.inc.php @@ -10,7 +10,7 @@ foreach ($graphs as $key => $text) $graph_type = $key; $graph_array['height'] = "100"; $graph_array['width'] = "215"; - $graph_array['to'] = $now; + $graph_array['to'] = $config['time']['now']; $graph_array['id'] = $app['app_id']; $graph_array['type'] = "application_".$key; echo('

'.$text.'

'); diff --git a/html/pages/device/apps/ntp-client.inc.php b/html/pages/device/apps/ntp-client.inc.php index 5fddd1a73..881b27c82 100644 --- a/html/pages/device/apps/ntp-client.inc.php +++ b/html/pages/device/apps/ntp-client.inc.php @@ -9,7 +9,7 @@ foreach ($graphs as $key => $text) { $graph_type = $key; $graph_array['height'] = "100"; $graph_array['width'] = "215"; - $graph_array['to'] = $now; + $graph_array['to'] = $config['time']['now']; $graph_array['id'] = $app['app_id']; $graph_array['type'] = "application_".$key; echo('

'.$text.'

'); diff --git a/html/pages/device/apps/ntpd-server.inc.php b/html/pages/device/apps/ntpd-server.inc.php index a528a5290..26875d6cc 100644 --- a/html/pages/device/apps/ntpd-server.inc.php +++ b/html/pages/device/apps/ntpd-server.inc.php @@ -14,7 +14,7 @@ foreach ($graphs as $key => $text) { $graph_type = $key; $graph_array['height'] = "100"; $graph_array['width'] = "215"; - $graph_array['to'] = $now; + $graph_array['to'] = $config['time']['now']; $graph_array['id'] = $app['app_id']; $graph_array['type'] = "application_".$key; echo('

'.$text.'

'); diff --git a/html/pages/device/apps/powerdns.inc.php b/html/pages/device/apps/powerdns.inc.php index a7a343fe8..4aa7f2b3d 100644 --- a/html/pages/device/apps/powerdns.inc.php +++ b/html/pages/device/apps/powerdns.inc.php @@ -15,7 +15,7 @@ foreach ($graphs as $key => $text) $graph_type = $key; $graph_array['height'] = "100"; $graph_array['width'] = "215"; - $graph_array['to'] = $now; + $graph_array['to'] = $config['time']['now']; $graph_array['id'] = $app['app_id']; $graph_array['type'] = "application_".$key; diff --git a/html/pages/device/apps/shoutcast.inc.php b/html/pages/device/apps/shoutcast.inc.php index 9354a1816..cceb5ffc1 100644 --- a/html/pages/device/apps/shoutcast.inc.php +++ b/html/pages/device/apps/shoutcast.inc.php @@ -33,7 +33,7 @@ if (isset($total) && $total == true) $graph_type = $key; $graph_array['height'] = "100"; $graph_array['width'] = "215"; - $graph_array['to'] = $now; + $graph_array['to'] = $config['time']['now']; $graph_array['id'] = $app['app_id']; $graph_array['type'] = "application_".$key; echo('

'.$text.'

'); @@ -60,7 +60,7 @@ foreach ($files as $id => $file) $graph_type = $key; $graph_array['height'] = "100"; $graph_array['width'] = "215"; - $graph_array['to'] = $now; + $graph_array['to'] = $config['time']['now']; $graph_array['id'] = $app['app_id']; $graph_array['type'] = "application_".$key; $graph_array['hostname'] = $hostname; diff --git a/html/pages/device/health/mempool.inc.php b/html/pages/device/health/mempool.inc.php index 22149af6a..fe0f22d53 100644 --- a/html/pages/device/health/mempool.inc.php +++ b/html/pages/device/health/mempool.inc.php @@ -7,6 +7,8 @@ echo(""); $i = '1'; +#FIXME css alternating colours + foreach (dbFetchRows("SELECT * FROM `mempools` WHERE device_id = ?", array($device['device_id'])) as $mempool) { if (!is_integer($i/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; } @@ -14,10 +16,10 @@ foreach (dbFetchRows("SELECT * FROM `mempools` WHERE device_id = ?", array($devi $text_descr = rewrite_entity_descr($mempool['mempool_descr']); $mempool_url = "device/".$device['device_id']."/health/mempool/"; - $mini_url = "graph.php?id=".$mempool['mempool_id']."&type=".$graph_type."&from=".$day."&to=".$now."&width=80&height=20&bg=f4f4f4"; + $mini_url = "graph.php?id=".$mempool['mempool_id']."&type=".$graph_type."&from=".$config['time']['day']."&to=".$config['time']['now']."&width=80&height=20&bg=f4f4f4"; $mempool_popup = "onmouseover=\"return overlib('
".$device['hostname']." - ".$text_descr; - $mempool_popup .= "
"; + $mempool_popup .= ""; $mempool_popup .= "', RIGHT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\""; $total = formatStorage($mempool['mempool_total']); diff --git a/html/pages/device/health/processor.inc.php b/html/pages/device/health/processor.inc.php index 89a3fd8a6..e35b92ba0 100644 --- a/html/pages/device/health/processor.inc.php +++ b/html/pages/device/health/processor.inc.php @@ -10,14 +10,14 @@ foreach (dbFetchRows("SELECT * FROM `processors` WHERE device_id = ?", array($de { $proc_url = "device/device=".$device['device_id']."/tab=health/metric=processor/"; - $mini_url = "graph.php?id=".$proc['processor_id']."&type=".$graph_type."&from=".$day."&to=".$now."&width=80&height=20&bg=f4f4f4"; + $mini_url = "graph.php?id=".$proc['processor_id']."&type=".$graph_type."&from=".$day."&to=".$config['time']['now']."&width=80&height=20&bg=f4f4f4"; $text_descr = $proc['processor_descr']; $text_descr = rewrite_entity_descr($text_descr); $proc_popup = "onmouseover=\"return overlib('
".$device['hostname']." - ".$text_descr; - $proc_popup .= "
"; + $proc_popup .= ""; $proc_popup .= "', RIGHT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\""; $percent = round($proc['processor_usage']); diff --git a/html/pages/device/health/storage.inc.php b/html/pages/device/health/storage.inc.php index 8c9214f2d..00bf6249f 100644 --- a/html/pages/device/health/storage.inc.php +++ b/html/pages/device/health/storage.inc.php @@ -28,7 +28,7 @@ foreach (dbFetchRows("SELECT * FROM `storage` WHERE device_id = ? ORDER BY stora $fs_url = "device/device=".$device['device_id']."/tab=health/metric=storage/"; $fs_popup = "onmouseover=\"return overlib('
".$device['hostname']." - ".$drive['storage_descr']; - $fs_popup .= "
"; + $fs_popup .= ""; $fs_popup .= "', RIGHT, FGCOLOR, '#e5e5e5');\" onmouseout=\"return nd();\""; $background = get_percentage_colours($percent); diff --git a/html/pages/device/hrdevice.inc.php b/html/pages/device/hrdevice.inc.php index 096ffc0d3..50106a0d6 100644 --- a/html/pages/device/hrdevice.inc.php +++ b/html/pages/device/hrdevice.inc.php @@ -13,16 +13,16 @@ foreach (dbFetchRows("SELECT * FROM `hrDevice` WHERE `device_id` = ? ORDER BY `h $proc_id = dbFetchCell("SELECT processor_id FROM processors WHERE device_id = '".$device['device_id']."' AND hrDeviceIndex = '".$hrdevice['hrDeviceIndex']."'"); $proc_url = "device/".$device['device_id']."/health/processor/"; $proc_popup = "onmouseover=\"return overlib('
".$device['hostname']." - ".$hrdevice['hrDeviceDescr']; - $proc_popup .= "
"; + $proc_popup .= ""; $proc_popup .= "', RIGHT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\""; echo(""); $graph_array['height'] = "20"; $graph_array['width'] = "100"; - $graph_array['to'] = $now; + $graph_array['to'] = ".$config['time']['now']."; $graph_array['id'] = $proc_id; $graph_array['type'] = 'processor_usage'; - $graph_array['from'] = $day; + $graph_array['from'] = $config['time']['day']; $graph_array_zoom = $graph_array; $graph_array_zoom['height'] = "150"; $graph_array_zoom['width'] = "400"; $mini_graph = overlib_link($proc_url, generate_graph_tag($graph_array), generate_graph_tag($graph_array_zoom), NULL); @@ -39,10 +39,10 @@ foreach (dbFetchRows("SELECT * FROM `hrDevice` WHERE `device_id` = ? ORDER BY `h $graph_array['height'] = "20"; $graph_array['width'] = "100"; - $graph_array['to'] = $now; + $graph_array['to'] = $config['time']['now']; $graph_array['id'] = $interface['interface_id']; $graph_array['type'] = 'port_bits'; - $graph_array['from'] = $day; + $graph_array['from'] = $config['time']['day']; $graph_array_zoom = $graph_array; $graph_array_zoom['height'] = "150"; $graph_array_zoom['width'] = "400"; # FIXME click on graph should also link to port, but can't use generate_port_link here... diff --git a/html/pages/device/overview/c6kxbar.inc.php b/html/pages/device/overview/c6kxbar.inc.php index 35de650b1..f0021a546 100644 --- a/html/pages/device/overview/c6kxbar.inc.php +++ b/html/pages/device/overview/c6kxbar.inc.php @@ -53,12 +53,12 @@ foreach ($entity_state['group']['c6kxbar'] as $index => $entry) $graph_array = array(); $graph_array['height'] = "100"; $graph_array['width'] = "210"; - $graph_array['to'] = $now; + $graph_array['to'] = $config['time']['now']; $graph_array['id'] = $device['device_id']; $graph_array['mod'] = $index; $graph_array['chan'] = $subindex; $graph_array['type'] = "c6kxbar_util"; - $graph_array['from'] = $day; + $graph_array['from'] = $config['time']['day']; $graph_array['legend'] = "no"; $link_array = $graph_array; diff --git a/html/pages/device/overview/generic/sensor.inc.php b/html/pages/device/overview/generic/sensor.inc.php index ececd96f0..30863cda6 100644 --- a/html/pages/device/overview/generic/sensor.inc.php +++ b/html/pages/device/overview/generic/sensor.inc.php @@ -27,7 +27,7 @@ if (count($sensors)) $graph_array = array(); $graph_array['height'] = "100"; $graph_array['width'] = "210"; - $graph_array['to'] = $now; + $graph_array['to'] = $config['time']['now']; $graph_array['id'] = $sensor['sensor_id']; $graph_array['type'] = $graph_type; $graph_array['from'] = $config['time']['day']; diff --git a/html/pages/device/overview/mempools.inc.php b/html/pages/device/overview/mempools.inc.php index 90444cbaa..9edd52140 100644 --- a/html/pages/device/overview/mempools.inc.php +++ b/html/pages/device/overview/mempools.inc.php @@ -24,10 +24,10 @@ if (count($mempools)) $graph_array = array(); $graph_array['height'] = "100"; $graph_array['width'] = "210"; - $graph_array['to'] = $now; + $graph_array['to'] = $config['time']['now']; $graph_array['id'] = $mempool['mempool_id']; $graph_array['type'] = $graph_type; - $graph_array['from'] = $day; + $graph_array['from'] = $config['time']['day']; $graph_array['legend'] = "no"; $link_array = $graph_array; diff --git a/html/pages/device/overview/ports.inc.php b/html/pages/device/overview/ports.inc.php index d8c0c4981..406b6ac6c 100644 --- a/html/pages/device/overview/ports.inc.php +++ b/html/pages/device/overview/ports.inc.php @@ -6,10 +6,10 @@ if ($ports['total']) $graph_array['height'] = "100"; $graph_array['width'] = "485"; - $graph_array['to'] = $now; + $graph_array['to'] = $config['time']['now']; $graph_array['id'] = $device['device_id']; $graph_array['type'] = "device_bits"; - $graph_array['from'] = $day; + $graph_array['from'] = $config['time']['day']; $graph_array['legend'] = "no"; $graph = generate_graph_tag($graph_array); diff --git a/html/pages/device/overview/processors.inc.php b/html/pages/device/overview/processors.inc.php index 51bfc9bd9..25aa4e1cc 100644 --- a/html/pages/device/overview/processors.inc.php +++ b/html/pages/device/overview/processors.inc.php @@ -25,10 +25,10 @@ if (count($processors)) $graph_array = array(); $graph_array['height'] = "100"; $graph_array['width'] = "210"; - $graph_array['to'] = $now; + $graph_array['to'] = $config['time']['now']; $graph_array['id'] = $proc['processor_id']; $graph_array['type'] = $graph_type; - $graph_array['from'] = $day; + $graph_array['from'] = $config['time']['day']; $graph_array['legend'] = "no"; $link_array = $graph_array; diff --git a/html/pages/device/overview/storage.inc.php b/html/pages/device/overview/storage.inc.php index 72ee796b9..50ed7a903 100644 --- a/html/pages/device/overview/storage.inc.php +++ b/html/pages/device/overview/storage.inc.php @@ -49,10 +49,10 @@ if (count($drives)) $graph_array = array(); $graph_array['height'] = "100"; $graph_array['width'] = "210"; - $graph_array['to'] = $now; + $graph_array['to'] = $config['time']['now']; $graph_array['id'] = $drive['storage_id']; $graph_array['type'] = $graph_type; - $graph_array['from'] = $day; + $graph_array['from'] = $config['time']['day']; $graph_array['legend'] = "no"; $link_array = $graph_array; diff --git a/html/pages/device/overview/toner.inc.php b/html/pages/device/overview/toner.inc.php index b4cbd2d24..5223db908 100644 --- a/html/pages/device/overview/toner.inc.php +++ b/html/pages/device/overview/toner.inc.php @@ -24,10 +24,10 @@ if (count($toners)) $graph_array = array(); $graph_array['height'] = "100"; $graph_array['width'] = "210"; - $graph_array['to'] = $now; + $graph_array['to'] = $config['time']['now']; $graph_array['id'] = $toner['toner_id']; $graph_array['type'] = $graph_type; - $graph_array['from'] = $day; + $graph_array['from'] = $config['time']['day']; $graph_array['legend'] = "no"; $link_array = $graph_array; diff --git a/html/pages/device/port/junose-atm-vp.inc.php b/html/pages/device/port/junose-atm-vp.inc.php index 803844dfa..1f2558d29 100644 --- a/html/pages/device/port/junose-atm-vp.inc.php +++ b/html/pages/device/port/junose-atm-vp.inc.php @@ -16,7 +16,7 @@ foreach (dbFetchRows("SELECT * FROM juniAtmVp WHERE interface_id = ?", array($in $graph_array['height'] = "100"; $graph_array['width'] = "214"; - $graph_array['to'] = $now; + $graph_array['to'] = $config['time']['now']; $graph_array['id'] = $vp['juniAtmVp_id']; $graph_array['type'] = $graph_type; diff --git a/html/pages/device/port/macaccounting.inc.php b/html/pages/device/port/macaccounting.inc.php index 5abbb6aad..4c8e67efd 100644 --- a/html/pages/device/port/macaccounting.inc.php +++ b/html/pages/device/port/macaccounting.inc.php @@ -151,9 +151,9 @@ if ($vars['subview'] == "top10") ".$addy['ipv4_address']." - ".$asn." ".$name." - ".$addy['ipv4_address']." - ".$asn."\ - \ + \ ', CENTER, LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 150);\" onmouseout=\"return nd();\" > - + ".$name.""); @@ -181,7 +181,7 @@ if ($vars['subview'] == "top10") $graph_array['id'] = $acc['ma_id']; $graph_array['height'] = "100"; $graph_array['width'] = "216"; - $graph_array['to'] = $now; + $graph_array['to'] = $config['time']['now']; echo('"); @@ -235,7 +235,7 @@ else { $graph_array['height'] = "100"; $graph_array['width'] = "218"; - $graph_array['to'] = $now; + $graph_array['to'] = $config['time']['now']; echo('
".$hrdevice['hrDeviceDescr']."
'); include("includes/print-graphrow.inc.php"); diff --git a/html/pages/device/port/pagp.inc.php b/html/pages/device/port/pagp.inc.php index 095eb2963..d390d0bd2 100644 --- a/html/pages/device/port/pagp.inc.php +++ b/html/pages/device/port/pagp.inc.php @@ -6,17 +6,17 @@ global $config; if (!$graph_type) { $graph_type = "pagp_bits"; } -$daily_traffic = "graph.php?port=" . $port['interface_id'] . "&type=$graph_type&from=$day&to=$now&width=215&height=100"; -$daily_url = "graph.php?port=" . $port['interface_id'] . "&type=$graph_type&from=$day&to=$now&width=500&height=150"; +$daily_traffic = "graph.php?port=" . $port['interface_id'] . "&type=$graph_type&from=".$config['time']['day']."&to=".$config['time']['now']."&width=215&height=100"; +$daily_url = "graph.php?port=" . $port['interface_id'] . "&type=$graph_type&from=".$config['time']['day']."&to=".$config['time']['now']."&width=500&height=150"; -$weekly_traffic = "graph.php?port=" . $port['interface_id'] . "&type=$graph_type&from=$week&to=$now&width=215&height=100"; -$weekly_url = "graph.php?port=" . $port['interface_id'] . "&type=$graph_type&from=$week&to=$now&width=500&height=150"; +$weekly_traffic = "graph.php?port=" . $port['interface_id'] . "&type=$graph_type&from=".$config['time']['week']."&to=".$config['time']['now']."&width=215&height=100"; +$weekly_url = "graph.php?port=" . $port['interface_id'] . "&type=$graph_type&from=".$config['time']['week']."&to=".$config['time']['now']."&width=500&height=150"; -$monthly_traffic = "graph.php?port=" . $port['interface_id'] . "&type=$graph_type&from=$month&to=$now&width=215&height=100"; -$monthly_url = "graph.php?port=" . $port['interface_id'] . "&type=$graph_type&from=$month&to=$now&width=500&height=150"; +$monthly_traffic = "graph.php?port=" . $port['interface_id'] . "&type=$graph_type&from=".$config['time']['month']."&to=".$config['time']['now']."&width=215&height=100"; +$monthly_url = "graph.php?port=" . $port['interface_id'] . "&type=$graph_type&from=".$config['time']['month']."&to=".$config['time']['now']."&width=500&height=150"; -$yearly_traffic = "graph.php?port=" . $port['interface_id'] . "&type=$graph_type&from=$year&to=$now&width=215&height=100"; -$yearly_url = "graph.php?port=" . $port['interface_id'] . "&type=$graph_type&from=$year&to=$now&width=500&height=150"; +$yearly_traffic = "graph.php?port=" . $port['interface_id'] . "&type=$graph_type&from=".$config['time']['yearh']."&to=".$config['time']['now']."&width=215&height=100"; +$yearly_url = "graph.php?port=" . $port['interface_id'] . "&type=$graph_type&from=".$config['time']['yearh']."&to=".$config['time']['now']."&width=500&height=150"; echo("', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\"> "); diff --git a/html/pages/device/ports.inc.php b/html/pages/device/ports.inc.php index 8443867a5..1a58acc1c 100644 --- a/html/pages/device/ports.inc.php +++ b/html/pages/device/ports.inc.php @@ -78,9 +78,9 @@ if ($vars['view'] == 'minigraphs') ".$device['hostname']." - ".$port['ifDescr']."\ ".$port['ifAlias']." \ - \ + \ ', CENTER, LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 150);\" onmouseout=\"return nd();\" >". - " + "
".truncate(short_port_descr($port['ifAlias']), 32, '')."
"); diff --git a/html/pages/device/pseudowires.inc.php b/html/pages/device/pseudowires.inc.php index 13a6e575d..6b07b7c9e 100644 --- a/html/pages/device/pseudowires.inc.php +++ b/html/pages/device/pseudowires.inc.php @@ -58,8 +58,8 @@ foreach (dbFetchRows("SELECT * FROM pseudowires AS P, ports AS I WHERE P.interfa { $pw_a['width'] = "150"; $pw_a['height'] = "30"; - $pw_a['from'] = $day; - $pw_a['to'] = $now; + $pw_a['from'] = $config['time']['day']; + $pw_a['to'] = $config['time']['now']; $pw_a['bg'] = $bg; $types = array('bits','upkts','errors'); foreach ($types as $graph_type) @@ -74,8 +74,8 @@ foreach (dbFetchRows("SELECT * FROM pseudowires AS P, ports AS I WHERE P.interfa { $pw_b['width'] = "150"; $pw_b['height'] = "30"; - $pw_b['from'] = $day; - $pw_b['to'] = $now; + $pw_b['from'] = $config['time']['day']; + $pw_b['to'] = $config['time']['now']; $pw_b['bg'] = $bg; $types = array('bits','upkts','errors'); foreach ($types as $graph_type) diff --git a/html/pages/device/routing/bgp.inc.php b/html/pages/device/routing/bgp.inc.php index a88d2e2b6..e66bdc1ed 100644 --- a/html/pages/device/routing/bgp.inc.php +++ b/html/pages/device/routing/bgp.inc.php @@ -127,7 +127,7 @@ foreach (dbFetchRows("SELECT * FROM `bgpPeers` WHERE `device_id` = ? ORDER BY `b unset($sep); $graph_type = "bgp_updates"; - $peer_daily_url = "graph.php?id=" . $peer['bgpPeer_id'] . "&type=" . $graph_type . "&from=$day&to=$now&width=500&height=150"; + $peer_daily_url = "graph.php?id=" . $peer['bgpPeer_id'] . "&type=" . $graph_type . "&from=".$config['time']['day']."&to=".$config['time']['now']."&width=500&height=150"; $peeraddresslink = "', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\">" . $peer['bgpPeerIdentifier'] . ""; echo('
'); include("includes/print-graphrow.inc.php"); diff --git a/html/pages/device/routing/cef.inc.php b/html/pages/device/routing/cef.inc.php index 78d31683f..785b0f653 100644 --- a/html/pages/device/routing/cef.inc.php +++ b/html/pages/device/routing/cef.inc.php @@ -89,7 +89,7 @@ foreach (dbFetchRows("SELECT * FROM `cef_switching` WHERE `device_id` = ? ORDER { $graph_array['height'] = "100"; $graph_array['width'] = "215"; - $graph_array['to'] = $now; + $graph_array['to'] = $config['time']['now']; $graph_array['id'] = $cef['cef_switching_id']; $graph_array['type'] = "cefswitching_graph"; diff --git a/html/pages/device/services.inc.php b/html/pages/device/services.inc.php index ed55669f1..d4bb3b1da 100644 --- a/html/pages/device/services.inc.php +++ b/html/pages/device/services.inc.php @@ -34,7 +34,7 @@ if (dbFetchCell("SELECT COUNT(service_id) FROM `services` WHERE device_id = ?", { $graph_array['height'] = "100"; $graph_array['width'] = "210"; - $graph_array['to'] = $now; + $graph_array['to'] = $config['time']['now']; $graph_array['id'] = $service['service_id']; $graph_array['type'] = "service_availability"; diff --git a/html/pages/front/default.php b/html/pages/front/default.php index c322f070f..bdda5a82d 100644 --- a/html/pages/front/default.php +++ b/html/pages/front/default.php @@ -42,7 +42,7 @@ if ($config['warn']['ifdown']) $interface = ifNameDescr($interface); generate_front_box("#ffdd99", "
".generate_device_link($interface, shorthost($interface['hostname']))."
Port Down
- + ".generate_port_link($interface, truncate(makeshortif($interface['label']),13,''))."
" . ($interface['ifAlias'] ? ''.truncate($interface['ifAlias'], 20, '').'' : '') . "
"); diff --git a/html/pages/front/demo.php b/html/pages/front/demo.php index 16058141a..3327725d6 100644 --- a/html/pages/front/demo.php +++ b/html/pages/front/demo.php @@ -17,10 +17,10 @@ foreach ($dev_list as $device_id => $descr) echo("
".$descr."
"); $graph_array['height'] = "100"; $graph_array['width'] = "310"; - $graph_array['to'] = $now; + $graph_array['to'] = $config['time']['now']; $graph_array['id'] = $device_id; $graph_array['type'] = "device_bits"; - $graph_array['from'] = $day; + $graph_array['from'] = $config['time']['day']; $graph_array['legend'] = "no"; $graph_array['popup_title'] = $descr; # $graph_array['link'] = generate_device_link($device_id); diff --git a/html/pages/front/example2.php b/html/pages/front/example2.php index 4da7cdf75..9ba99cdf2 100644 --- a/html/pages/front/example2.php +++ b/html/pages/front/example2.php @@ -143,28 +143,28 @@ if ($_SESSION['userlevel'] >= '5') if ($ports['transit']) { echo("', CENTER, LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 250);\" onmouseout=\"return nd();\" >". + "&from=".$config['time']['day']."&to=".$config['time']['now']."&width=400&height=150\'>', CENTER, LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 250);\" onmouseout=\"return nd();\" >". "
Internet Transit
". "
"); + "&from=".$config['time']['day']."&to=".$config['time']['now']."&width=200&height=100'>"); } if ($ports['l2tp']) { echo("', LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 250);\" onmouseout=\"return nd();\" >". + "&from=".$config['time']['day']."&to=".$config['time']['now']."&width=400&height=150\'>', LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 250);\" onmouseout=\"return nd();\" >". "
L2TP ADSL
". "
"); + "&from=".$config['time']['day']."&to=".$config['time']['now']."&width=200&height=100'>"); } if ($ports['voip']) { echo("', LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 250);\" onmouseout=\"return nd();\" >". + "&from=".$config['time']['day']."&to=".$config['time']['now']."&width=400&height=150\'>', LEFT, FGCOLOR, '#e5e5e5', BGCOLOR, '#e5e5e5', WIDTH, 400, HEIGHT, 250);\" onmouseout=\"return nd();\" >". "
VoIP to PSTN
". "
"); + "&from=".$config['time']['day']."&to=".$config['time']['now']."&width=200&height=100'>"); } } diff --git a/html/pages/front/jt.php b/html/pages/front/jt.php index fce32f875..76ccebf56 100644 --- a/html/pages/front/jt.php +++ b/html/pages/front/jt.php @@ -142,12 +142,12 @@ if ($_SESSION['userlevel'] >= '5') if ($ports['peering'] && $ports['transit']) { echo(""); + "&from=".$config['time']['day']."&to=".$config['time']['now']."&width=385&height=100&legend=no'>"); } echo(""); @@ -157,23 +157,23 @@ if ($_SESSION['userlevel'] >= '5') if ($ports['transit']) { echo(""); + "&from=".$config['time']['day']."&to=".$config['time']['now']."&width=155&height=100&legend=no'>"); } if ($ports['peering']) { echo(""); + "&from=".$config['time']['day']."&to=".$config['time']['now']."&width=155&height=100&legend=no'>"); } echo(""); @@ -183,12 +183,12 @@ if ($_SESSION['userlevel'] >= '5') if ($ports['broadband'] && $ports['wave_broadband'] && $ports['new_broadband']) { echo(""); + "&from=".$config['time']['day']."&to=".$config['time']['now']."&width=385&height=100&legend=no&inverse=c'>"); } echo("
"); @@ -196,12 +196,12 @@ if ($_SESSION['userlevel'] >= '5') if ($ports['broadband']) { echo(""); + "&from=".$config['time']['day']."&to=".$config['time']['now']."&width=155&height=100&legend=no'>
"); } echo("
"); @@ -209,11 +209,11 @@ if ($_SESSION['userlevel'] >= '5') if ($ports['new_broadband']) { echo(""); + "
"); } echo(""); @@ -221,11 +221,11 @@ if ($_SESSION['userlevel'] >= '5') if ($ports['wave_broadband']) { echo(""); + ""); } echo(""); diff --git a/html/pages/front/traffic.php b/html/pages/front/traffic.php index 2a567431b..64aa779bf 100644 --- a/html/pages/front/traffic.php +++ b/html/pages/front/traffic.php @@ -141,52 +141,56 @@ if ($_SESSION['userlevel'] >= '5') echo("
"); - if ($ports['peering'] && $ports['transit']) { + if ($ports['peering'] && $ports['transit']) + { echo(""); + "&from=".$config['time']['day']."&to=".$config['time']['now']."&width=385&height=100&legend=no'>
"); } echo(""); echo("
"); - if ($ports['transit']) { + if ($ports['transit']) + { echo(""); + "&from=".$config['time']['day']."&to=".$config['time']['now']."&width=155&height=100&legend=no'>
"); } - if ($ports['peering']) { + if ($ports['peering']) + { echo(""); + "&from=".$config['time']['day']."&to=".$config['time']['now']."&width=155&height=100&legend=no'>"); } - if ($ports['core']) { + if ($ports['core']) + { echo(""); + "&from=".$config['time']['day']."&to=".$config['time']['now']."&width=385&height=100&legend=no'>"); } echo(""); diff --git a/html/pages/graphs.inc.php b/html/pages/graphs.inc.php index eaaebf035..2a6d8fd7f 100644 --- a/html/pages/graphs.inc.php +++ b/html/pages/graphs.inc.php @@ -56,7 +56,7 @@ if (!$auth) $graph_array['height'] = "60"; $graph_array['width'] = $thumb_width; $graph_array['legend'] = "no"; - $graph_array['to'] = $now; + $graph_array['to'] = $config['time']['now']; print_optionbar_start(); echo($title); diff --git a/html/pages/health/mempool.inc.php b/html/pages/health/mempool.inc.php index 88f444aeb..fbcfcc655 100644 --- a/html/pages/health/mempool.inc.php +++ b/html/pages/health/mempool.inc.php @@ -20,10 +20,10 @@ foreach (dbFetchRows("SELECT * FROM `mempools` AS M, `devices` as D WHERE D.devi $text_descr = $mempool['mempool_descr']; $mempool_url = "device/device=".$mempool['device_id']."/tab=health/metric=mempool/"; - $mini_url = "graph.php?id=".$mempool['mempool_id']."&type=".$graph_type."&from=".$day."&to=".$now."&width=80&height=20&bg=f4f4f4"; + $mini_url = "graph.php?id=".$mempool['mempool_id']."&type=".$graph_type."&from=".$config['time']['day']."&to=".$config['time']['now']."&width=80&height=20&bg=f4f4f4"; $mempool_popup = "onmouseover=\"return overlib('
".$device['hostname']." - ".$text_descr; - $mempool_popup .= "
"; + $mempool_popup .= ""; $mempool_popup .= "', RIGHT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\""; $total = formatStorage($mempool['mempool_total']); @@ -46,17 +46,17 @@ foreach (dbFetchRows("SELECT * FROM `mempools` AS M, `devices` as D WHERE D.devi { echo("
"); - $daily_graph = "graph.php?id=" . $mempool['mempool_id'] . "&type=".$graph_type."&from=$day&to=$now&width=211&height=100"; - $daily_url = "graph.php?id=" . $mempool['mempool_id'] . "&type=".$graph_type."&from=$day&to=$now&width=400&height=150"; + $daily_graph = "graph.php?id=" . $mempool['mempool_id'] . "&type=".$graph_type."&from=".$config['time']['day']."&to=".$config['time']['now']."&width=211&height=100"; + $daily_url = "graph.php?id=" . $mempool['mempool_id'] . "&type=".$graph_type."&from=".$config['time']['day']."&to=".$config['time']['now']."&width=400&height=150"; - $weekly_graph = "graph.php?id=" . $mempool['mempool_id'] . "&type=".$graph_type."&from=$week&to=$now&width=211&height=100"; - $weekly_url = "graph.php?id=" . $mempool['mempool_id'] . "&type=".$graph_type."&from=$week&to=$now&width=400&height=150"; + $weekly_graph = "graph.php?id=" . $mempool['mempool_id'] . "&type=".$graph_type."&from=".$config['time']['week']."&to=".$config['time']['now']."&width=211&height=100"; + $weekly_url = "graph.php?id=" . $mempool['mempool_id'] . "&type=".$graph_type."&from=".$config['time']['week']."&to=".$config['time']['now']."&width=400&height=150"; - $monthly_graph = "graph.php?id=" . $mempool['mempool_id'] . "&type=".$graph_type."&from=$month&to=$now&width=211&height=100"; - $monthly_url = "graph.php?id=" . $mempool['mempool_id'] . "&type=".$graph_type."&from=$month&to=$now&width=400&height=150"; + $monthly_graph = "graph.php?id=" . $mempool['mempool_id'] . "&type=".$graph_type."&from=".$config['time']['month']."&to=".$config['time']['now']."&width=211&height=100"; + $monthly_url = "graph.php?id=" . $mempool['mempool_id'] . "&type=".$graph_type."&from=".$config['time']['month']."&to=".$config['time']['now']."&width=400&height=150"; - $yearly_graph = "graph.php?id=" . $mempool['mempool_id'] . "&type=".$graph_type."&from=$year&to=$now&width=211&height=100"; - $yearly_url = "graph.php?id=" . $mempool['mempool_id'] . "&type=".$graph_type."&from=$year&to=$now&width=400&height=150"; + $yearly_graph = "graph.php?id=" . $mempool['mempool_id'] . "&type=".$graph_type."&from=".$config['time']['yearh']."&to=".$config['time']['now']."&width=211&height=100"; + $yearly_url = "graph.php?id=" . $mempool['mempool_id'] . "&type=".$graph_type."&from=".$config['time']['yearh']."&to=".$config['time']['now']."&width=400&height=150"; echo("', LEFT);\" onmouseout=\"return nd();\"> "); diff --git a/html/pages/health/processor.inc.php b/html/pages/health/processor.inc.php index 36ddc2a28..4d0a7fcc8 100644 --- a/html/pages/health/processor.inc.php +++ b/html/pages/health/processor.inc.php @@ -27,10 +27,10 @@ foreach (dbFetchRows("SELECT * FROM `processors` AS P, `devices` AS D WHERE D.de $proc_url = "device/".$device['device_id']."/health/processor/"; - $mini_url = "graph.php?id=".$proc['processor_id']."&type=".$graph_type."&from=".$day."&to=".$now."&width=80&height=20&bg=f4f4f400"; + $mini_url = "graph.php?id=".$proc['processor_id']."&type=".$graph_type."&from=".$config['time']['day']."&to=".$config['time']['now']."&width=80&height=20&bg=f4f4f400"; $proc_popup = "onmouseover=\"return overlib('
".$device['hostname']." - ".$text_descr; - $proc_popup .= "
"; + $proc_popup .= ""; $proc_popup .= "', RIGHT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\""; $perc = round($proc['processor_usage']); @@ -50,17 +50,17 @@ foreach (dbFetchRows("SELECT * FROM `processors` AS P, `devices` AS D WHERE D.de { echo('
'); - $daily_graph = "graph.php?id=" . $proc['processor_id'] . "&type=".$graph_type."&from=$day&to=$now&width=211&height=100"; - $daily_url = "graph.php?id=" . $proc['processor_id'] . "&type=".$graph_type."&from=$day&to=$now&width=400&height=150"; + $daily_graph = "graph.php?id=" . $proc['processor_id'] . "&type=".$graph_type."&from=".$config['time']['day']."&to=".$config['time']['now']."&width=211&height=100"; + $daily_url = "graph.php?id=" . $proc['processor_id'] . "&type=".$graph_type."&from=".$config['time']['day']."&to=".$config['time']['now']."&width=400&height=150"; - $weekly_graph = "graph.php?id=" . $proc['processor_id'] . "&type=".$graph_type."&from=$week&to=$now&width=211&height=100"; - $weekly_url = "graph.php?id=" . $proc['processor_id'] . "&type=".$graph_type."&from=$week&to=$now&width=400&height=150"; + $weekly_graph = "graph.php?id=" . $proc['processor_id'] . "&type=".$graph_type."&from=".$config['time']['week']."&to=".$config['time']['now']."&width=211&height=100"; + $weekly_url = "graph.php?id=" . $proc['processor_id'] . "&type=".$graph_type."&from=".$config['time']['week']."&to=".$config['time']['now']."&width=400&height=150"; - $monthly_graph = "graph.php?id=" . $proc['processor_id'] . "&type=".$graph_type."&from=$month&to=$now&width=211&height=100"; - $monthly_url = "graph.php?id=" . $proc['processor_id'] . "&type=".$graph_type."&from=$month&to=$now&width=400&height=150"; + $monthly_graph = "graph.php?id=" . $proc['processor_id'] . "&type=".$graph_type."&from=".$config['time']['month']."&to=".$config['time']['now']."&width=211&height=100"; + $monthly_url = "graph.php?id=" . $proc['processor_id'] . "&type=".$graph_type."&from=".$config['time']['month']."&to=".$config['time']['now']."&width=400&height=150"; - $yearly_graph = "graph.php?id=" . $proc['processor_id'] . "&type=".$graph_type."&from=$year&to=$now&width=211&height=100"; - $yearly_url = "graph.php?id=" . $proc['processor_id'] . "&type=".$graph_type."&from=$year&to=$now&width=400&height=150"; + $yearly_graph = "graph.php?id=" . $proc['processor_id'] . "&type=".$graph_type."&from=".$config['time']['yearh']."&to=".$config['time']['now']."&width=211&height=100"; + $yearly_url = "graph.php?id=" . $proc['processor_id'] . "&type=".$graph_type."&from=".$config['time']['yearh']."&to=".$config['time']['now']."&width=400&height=150"; echo(" ', LEFT);\" onmouseout=\"return nd();\"> "); diff --git a/html/pages/health/sensors.inc.php b/html/pages/health/sensors.inc.php index df671f87b..e682df542 100644 --- a/html/pages/health/sensors.inc.php +++ b/html/pages/health/sensors.inc.php @@ -38,16 +38,16 @@ foreach (dbFetchRows($sql, $param) as $sensor) if ($sensor['sensor_current'] >= $sensor['sensor_limit']) { $alert = 'alert'; } else { $alert = ""; } } - $weekly_sensor = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=$week&to=$now&width=500&height=150"; + $weekly_sensor = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=".$config['time']['week']."&to=".$config['time']['now']."&width=500&height=150"; $sensor_popup = "', LEFT);\" onmouseout=\"return nd();\"> " . $sensor['sensor_descr'] . ""; - $sensor_day = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=$day&to=$now&width=300&height=100"; - $sensor_week = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=$week&to=$now&width=300&height=100"; - $sensor_month = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=$month&to=$now&width=300&height=100"; - $sensor_year = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=$year&to=$now&width=300&height=100"; + $sensor_day = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=".$config['time']['day']."&to=".$config['time']['now']."&width=300&height=100"; + $sensor_week = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=".$config['time']['week']."&to=".$config['time']['now']."&width=300&height=100"; + $sensor_month = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=".$config['time']['month']."&to=".$config['time']['now']."&width=300&height=100"; + $sensor_year = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=".$config['year']."&to=".$config['time']['now']."&width=300&height=100"; - $sensor_minigraph = "".$sensor['hostname']." - ".mres($sensor['sensor_descr']); $sensor_minigraph .= "
', RIGHT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\" >"; @@ -65,17 +65,17 @@ foreach (dbFetchRows($sql, $param) as $sensor) { echo("
"); - $daily_graph = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=$day&to=$now&width=211&height=100"; - $daily_url = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=$day&to=$now&width=400&height=150"; + $daily_graph = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=".$config['time']['day']."&to=".$config['time']['now']."&width=211&height=100"; + $daily_url = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=".$config['time']['day']."&to=".$config['time']['now']."&width=400&height=150"; - $weekly_graph = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=$week&to=$now&width=211&height=100"; - $weekly_url = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=$week&to=$now&width=400&height=150"; + $weekly_graph = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=".$config['time']['week']."&to=".$config['time']['now']."&width=211&height=100"; + $weekly_url = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=".$config['time']['week']."&to=".$config['time']['now']."&width=400&height=150"; - $monthly_graph = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=$month&to=$now&width=211&height=100"; - $monthly_url = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=$month&to=$now&width=400&height=150"; + $monthly_graph = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=".$config['time']['month']."&to=".$config['time']['now']."&width=211&height=100"; + $monthly_url = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=".$config['time']['month']."&to=".$config['time']['now']."&width=400&height=150"; - $yearly_graph = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=$year&to=$now&width=211&height=100"; - $yearly_url = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=$year&to=$now&width=400&height=150"; + $yearly_graph = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=".$config['time']['yearh']."&to=".$config['time']['now']."&width=211&height=100"; + $yearly_url = "graph.php?id=" . $sensor['sensor_id'] . "&type=".$graph_type."&from=".$config['time']['yearh']."&to=".$config['time']['now']."&width=400&height=150"; echo("', LEFT);\" onmouseout=\"return nd();\"> "); diff --git a/html/pages/ports/graph.inc.php b/html/pages/ports/graph.inc.php index 015b88641..768aeca8b 100644 --- a/html/pages/ports/graph.inc.php +++ b/html/pages/ports/graph.inc.php @@ -27,10 +27,10 @@ foreach ($ports as $port) $graph_array = array(); $graph_array['height'] = 100; $graph_array['width'] = 210; - $graph_array['to'] = $now; + $graph_array['to'] = $config['time']['now']; $graph_array['id'] = $port['interface_id']; $graph_array['type'] = $graph_type; - $graph_array['from'] = $day; + $graph_array['from'] = $config['time']['day']; $graph_array['legend'] = "no"; $link_array = $graph_array; diff --git a/html/pages/pseudowires.inc.php b/html/pages/pseudowires.inc.php index a7e645ade..4d8649ff7 100644 --- a/html/pages/pseudowires.inc.php +++ b/html/pages/pseudowires.inc.php @@ -58,8 +58,8 @@ foreach (dbFetchRows("SELECT * FROM pseudowires AS P, ports AS I, devices AS D W { $pw_a['width'] = "150"; $pw_a['height'] = "30"; - $pw_a['from'] = $day; - $pw_a['to'] = $now; + $pw_a['from'] = $config['time']['day']; + $pw_a['to'] = $config['time']['now']; $pw_a['bg'] = $bg; $types = array('bits','upkts','errors'); foreach ($types as $graph_type) @@ -74,8 +74,8 @@ foreach (dbFetchRows("SELECT * FROM pseudowires AS P, ports AS I, devices AS D W { $pw_b['width'] = "150"; $pw_b['height'] = "30"; - $pw_b['from'] = $day; - $pw_b['to'] = $now; + $pw_b['from'] = $config['time']['day']; + $pw_b['to'] = $config['time']['now']; $pw_b['bg'] = $bg; $types = array('bits','upkts','errors'); foreach ($types as $graph_type) diff --git a/html/pages/routing/bgp.inc.php b/html/pages/routing/bgp.inc.php index af6d154c3..89c589dba 100644 --- a/html/pages/routing/bgp.inc.php +++ b/html/pages/routing/bgp.inc.php @@ -167,11 +167,11 @@ else // display overlib graphs $graph_type = "bgp_updates"; - $local_daily_url = "graph.php?id=" . $peer['bgpPeer_id'] . "&type=" . $graph_type . "&from=$day&to=$now&width=500&height=150&&afi=ipv4&safi=unicast"; + $local_daily_url = "graph.php?id=" . $peer['bgpPeer_id'] . "&type=" . $graph_type . "&from=".$config['time']['day']."&to=".$config['time']['now']."&width=500&height=150&&afi=ipv4&safi=unicast"; $localaddresslink = "', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\">" . $peer['bgpLocalAddr'] . ""; $graph_type = "bgp_updates"; - $peer_daily_url = "graph.php?id=" . $peer['bgpPeer_id'] . "&type=" . $graph_type . "&from=$day&to=$now&width=500&height=150"; + $peer_daily_url = "graph.php?id=" . $peer['bgpPeer_id'] . "&type=" . $graph_type . "&from=".$config['time']['day']."&to=".$config['time']['now']."&width=500&height=150"; $peeraddresslink = "', LEFT".$config['overlib_defaults'].");\" onmouseout=\"return nd();\">" . $peer['bgpPeerIdentifier'] . ""; echo('
'); include("includes/print-graphrow.inc.php"); diff --git a/html/pages/routing/vrf.inc.php b/html/pages/routing/vrf.inc.php index 7d3d7eb11..3adfca948 100644 --- a/html/pages/routing/vrf.inc.php +++ b/html/pages/routing/vrf.inc.php @@ -100,8 +100,8 @@ if($_GET['optb'] == "all" ) { case 'errors': $port['width'] = "130"; $port['height'] = "30"; - $port['from'] = $day; - $port['to'] = $now; + $port['from'] = $config['time']['day']; + $port['to'] = $config['time']['now']; $port['bg'] = "#".$bg; $port['graph_type'] = "port_".$_GET['optc']; echo("
= '5') { $graph_array['height'] = "100"; $graph_array['width'] = "215"; - $graph_array['to'] = $now; + $graph_array['to'] = $config['time']['now']; $graph_array['id'] = $service['service_id']; $graph_array['type'] = "service_availability"; diff --git a/includes/discovery/bgp-peers.inc.php b/includes/discovery/bgp-peers.inc.php index d69ba29fb..3792859f0 100755 --- a/includes/discovery/bgp-peers.inc.php +++ b/includes/discovery/bgp-peers.inc.php @@ -1,5 +1,7 @@ $entry) { switch ($entry['jnxBgpM2PeerRemoteAddrType']) { case 'ipv4': $ip = long2ip(hexdec($entry['jnxBgpM2PeerRemoteAddr'])); + if ($debug) { echo("peerindex for ipv4 $ip is " . $entry['jnxBgpM2PeerIndex'] . "\n"); } $j_peerIndexes[$ip] = $entry['jnxBgpM2PeerIndex']; break; case 'ipv6': $ip6 = trim(str_replace(' ','',$entry['jnxBgpM2PeerRemoteAddr']),'"'); $ip6 = substr($ip6,0,4) . ':' . substr($ip6,4,4) . ':' . substr($ip6,8,4) . ':' . substr($ip6,12,4) . ':' . substr($ip6,16,4) . ':' . substr($ip6,20,4) . ':' . substr($ip6,24,4) . ':' . substr($ip6,28,4); $ip6 = Net_IPv6::compress($ip6); + if ($debug) { echo("peerindex for ipv6 $ip6 is " . $entry['jnxBgpM2PeerIndex'] . "\n"); } $j_peerIndexes[$ip6] = $entry['jnxBgpM2PeerIndex']; break; default: @@ -146,7 +151,7 @@ if ($config['enable_bgp']) $j_afisafi[$index][] = $afisafi; } } - + foreach ($j_afisafi[$j_peerIndexes[$peer['ip']]] as $afisafi) { list ($afi,$safi) = explode('.',$afisafi); $safi = $safis[$safi]; diff --git a/includes/static-config.php b/includes/static-config.php index 6937abc96..1d0b3183c 100644 --- a/includes/static-config.php +++ b/includes/static-config.php @@ -1191,15 +1191,6 @@ if ($config['memcached']['enable']) # Set some times needed by loads of scripts (it's dynamic, so we do it here!) -## Please remove these where found replacing with $config['time'] - -$now = time(); -$day = time() - (24 * 60 * 60); -$twoday = time() - (2 * 24 * 60 * 60); -$week = time() - (7 * 24 * 60 * 60); -$month = time() - (31 * 24 * 60 * 60); -$year = time() - (365 * 24 * 60 * 60); - $config['time']['now'] = time(); $config['time']['fourhour'] = time() - (4 * 60 * 60); $config['time']['sixhour'] = time() - (6 * 60 * 60); diff --git a/mibs/ASTERISK-MIB b/mibs/ASTERISK-MIB new file mode 100644 index 000000000..56b9be9d2 --- /dev/null +++ b/mibs/ASTERISK-MIB @@ -0,0 +1,739 @@ +ASTERISK-MIB DEFINITIONS ::= BEGIN + +IMPORTS + OBJECT-TYPE, MODULE-IDENTITY, Integer32, Counter32, TimeTicks + FROM SNMPv2-SMI + + TEXTUAL-CONVENTION, DisplayString, TruthValue + FROM SNMPv2-TC + + digium + FROM DIGIUM-MIB; + +asterisk MODULE-IDENTITY + LAST-UPDATED "200603061840Z" + ORGANIZATION "Digium, Inc." + CONTACT-INFO + "Mark A. Spencer + Postal: Digium, Inc. + 445 Jan Davis Drive + Huntsville, AL 35806 + USA + Tel: +1 256 428 6000 + Email: markster@digium.com + + Thorsten Lockert + Postal: Voop AS + Boehmergaten 42 + NO-5057 Bergen + Norway + Tel: +47 5598 7200 + Email: tholo@voop.no" + DESCRIPTION + "Asterisk is an Open Source PBX. This MIB defined + objects for managing Asterisk instances." + REVISION "200603061840Z" + DESCRIPTION + "Change audio codec identification from 3kAudio to + Audio3k to conform better with specification. + + Expand on contact information." + REVISION "200602041900Z" + DESCRIPTION + "Initial published revision." + ::= { digium 1 } + +asteriskVersion OBJECT IDENTIFIER ::= { asterisk 1 } +asteriskConfiguration OBJECT IDENTIFIER ::= { asterisk 2 } +asteriskModules OBJECT IDENTIFIER ::= { asterisk 3 } +asteriskIndications OBJECT IDENTIFIER ::= { asterisk 4 } +asteriskChannels OBJECT IDENTIFIER ::= { asterisk 5 } + +-- asteriskVersion + +astVersionString OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Text version string of the version of Asterisk that + the SNMP Agent was compiled to run against." + ::= { asteriskVersion 1 } + +astVersionTag OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "SubVersion revision of the version of Asterisk that + the SNMP Agent was compiled to run against -- this is + typically 0 for release-versions of Asterisk." + ::= { asteriskVersion 2 } + +-- asteriskConfiguration + +astConfigUpTime OBJECT-TYPE + SYNTAX TimeTicks + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Time ticks since Asterisk was started." + ::= { asteriskConfiguration 1 } + +astConfigReloadTime OBJECT-TYPE + SYNTAX TimeTicks + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Time ticks since Asterisk was last reloaded." + ::= { asteriskConfiguration 2 } + +astConfigPid OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The process id of the running Asterisk process." + ::= { asteriskConfiguration 3 } + +astConfigSocket OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The control socket for giving Asterisk commands." + ::= { asteriskConfiguration 4 } + +-- asteriskModules + +astNumModules OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Number of modules currently loaded into Asterisk." + ::= { asteriskModules 1 } + +-- asteriskIndications + +astNumIndications OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Number of indications currently defined in Asterisk." + ::= { asteriskIndications 1 } + +astCurrentIndication OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Default indication zone to use." + ::= { asteriskIndications 2 } + +astIndicationsTable OBJECT-TYPE + SYNTAX SEQUENCE OF AstIndicationsEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Table with all the indication zones currently know to + the running Asterisk instance." + ::= { asteriskIndications 3 } + +astIndicationsEntry OBJECT-TYPE + SYNTAX AstIndicationsEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Information about a single indication zone." + INDEX { astIndIndex } + ::= { astIndicationsTable 1 } + +AstIndicationsEntry ::= SEQUENCE { + astIndIndex Integer32, + astIndCountry DisplayString, + astIndAlias DisplayString, + astIndDescription DisplayString +} + +astIndIndex OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Numerical index into the table of indication zones." + ::= { astIndicationsEntry 1 } + +astIndCountry OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Country for which the indication zone is valid, + typically this is the ISO 2-letter code of the country." + ::= { astIndicationsEntry 2 } + +astIndAlias OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "" + ::= { astIndicationsEntry 3 } + +astIndDescription OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Description of the indication zone, usually the full + name of the country it is valid for." + ::= { astIndicationsEntry 4 } + +-- asteriskChannels + +astNumChannels OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current number of active channels." + ::= { asteriskChannels 1 } + +astChanTable OBJECT-TYPE + SYNTAX SEQUENCE OF AstChanEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Table with details of the currently active channels + in the Asterisk instance." + ::= { asteriskChannels 2 } + +astChanEntry OBJECT-TYPE + SYNTAX AstChanEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Details of a single channel." + INDEX { astChanIndex } + ::= { astChanTable 1 } + +AstChanEntry ::= SEQUENCE { + astChanIndex Integer32, + astChanName DisplayString, + astChanLanguage DisplayString, + astChanType DisplayString, + astChanMusicClass DisplayString, + astChanBridge DisplayString, + astChanMasq DisplayString, + astChanMasqr DisplayString, + astChanWhenHangup TimeTicks, + astChanApp DisplayString, + astChanData DisplayString, + astChanContext DisplayString, + astChanMacroContext DisplayString, + astChanMacroExten DisplayString, + astChanMacroPri Integer32, + astChanExten DisplayString, + astChanPri Integer32, + astChanAccountCode DisplayString, + astChanForwardTo DisplayString, + astChanUniqueId DisplayString, + astChanCallGroup Unsigned32, + astChanPickupGroup Unsigned32, + astChanState INTEGER, + astChanMuted TruthValue, + astChanRings Integer32, + astChanCidDNID DisplayString, + astChanCidNum DisplayString, + astChanCidName DisplayString, + astChanCidANI DisplayString, + astChanCidRDNIS DisplayString, + astChanCidPresentation DisplayString, + astChanCidANI2 Integer32, + astChanCidTON Integer32, + astChanCidTNS Integer32, + astChanAMAFlags INTEGER, + astChanADSI INTEGER, + astChanToneZone DisplayString, + astChanHangupCause INTEGER, + astChanVariables DisplayString, + astChanFlags BITS, + astChanTransferCap INTEGER +} + +astChanIndex OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Index into the channel table." + ::= { astChanEntry 1 } + +astChanName OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Name of the current channel." + ::= { astChanEntry 2 } + +astChanLanguage OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Which language the current channel is configured to + use -- used mainly for prompts." + ::= { astChanEntry 3 } + +astChanType OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Underlying technology for the current channel." + ::= { astChanEntry 4 } + +astChanMusicClass OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Music class to be used for Music on Hold for this + channel." + ::= { astChanEntry 5 } + +astChanBridge OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Which channel this channel is currently bridged (in a + conversation) with." + ::= { astChanEntry 6 } + +astChanMasq OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Channel masquerading for us." + ::= { astChanEntry 7 } + +astChanMasqr OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Channel we are masquerading for." + ::= { astChanEntry 8 } + +astChanWhenHangup OBJECT-TYPE + SYNTAX TimeTicks + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "How long until this channel will be hung up." + ::= { astChanEntry 9 } + +astChanApp OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current application for the channel." + ::= { astChanEntry 10 } + +astChanData OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Arguments passed to the current application." + ::= { astChanEntry 11 } + +astChanContext OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current extension context." + ::= { astChanEntry 12 } + +astChanMacroContext OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current macro context." + ::= { astChanEntry 13 } + +astChanMacroExten OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current macro extension." + ::= { astChanEntry 14 } + +astChanMacroPri OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current macro priority." + ::= { astChanEntry 15 } + +astChanExten OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current extension." + ::= { astChanEntry 16 } + +astChanPri OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Current priority." + ::= { astChanEntry 17 } + +astChanAccountCode OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Account Code for billing." + ::= { astChanEntry 18 } + +astChanForwardTo OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Where to forward to if asked to dial on this + interface." + ::= { astChanEntry 19 } + +astChanUniqueId OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Unique Channel Identifier." + ::= { astChanEntry 20 } + +astChanCallGroup OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Call Group." + ::= { astChanEntry 21 } + +astChanPickupGroup OBJECT-TYPE + SYNTAX Unsigned32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Pickup Group." + ::= { astChanEntry 22 } + +astChanState OBJECT-TYPE + SYNTAX INTEGER { + stateDown(0), + stateReserved(1), + stateOffHook(2), + stateDialing(3), + stateRing(4), + stateRinging(5), + stateUp(6), + stateBusy(7), + stateDialingOffHook(8), + statePreRing(9) + } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Channel state." + ::= { astChanEntry 23 } + +astChanMuted OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Transmission of voice data has been muted." + ::= { astChanEntry 24 } + +astChanRings OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Number of rings so far." + ::= { astChanEntry 25 } + +astChanCidDNID OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Dialled Number ID." + ::= { astChanEntry 26 } + +astChanCidNum OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Caller Number." + ::= { astChanEntry 27 } + +astChanCidName OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Caller Name." + ::= { astChanEntry 28 } + +astCanCidANI OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "ANI" + ::= { astChanEntry 29 } + +astChanCidRDNIS OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Redirected Dialled Number Service." + ::= { astChanEntry 30 } + +astChanCidPresentation OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Number Presentation/Screening." + ::= { astChanEntry 31 } + +astChanCidANI2 OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "ANI 2 (info digit)." + ::= { astChanEntry 32 } + +astChanCidTON OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Type of Number." + ::= { astChanEntry 33 } + +astChanCidTNS OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Transit Network Select." + ::= { astChanEntry 34 } + +astChanAMAFlags OBJECT-TYPE + SYNTAX INTEGER { + Default(0), + Omit(1), + Billing(2), + Documentation(3) + } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "AMA Flags." + ::= { astChanEntry 35 } + +astChanADSI OBJECT-TYPE + SYNTAX INTEGER { + Unknown(0), + Available(1), + Unavailable(2), + OffHookOnly(3) + } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Whether or not ADSI is detected on CPE." + ::= { astChanEntry 36 } + +astChanToneZone OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Indication zone to use for channel." + ::= { astChanEntry 37 } + +astChanHangupCause OBJECT-TYPE + SYNTAX INTEGER { + NotDefined(0), + Unregistered(3), + Normal(16), + Busy(17), + NoAnswer(19), + Congestion(34), + Failure(38), + NoSuchDriver(66) + } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Why is the channel hung up." + ::= { astChanEntry 38 } + +astChanVariables OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Channel Variables defined for this channel." + ::= { astChanEntry 39 } + +astChanFlags OBJECT-TYPE + SYNTAX BITS { + WantsJitter(0), + DeferDTMF(1), + WriteInterrupt(2), + Blocking(3), + Zombie(4), + Exception(5), + MusicOnHold(6), + Spying(7), + NativeBridge(8), + AutoIncrementingLoop(9) + } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Flags set on this channel." + ::= { astChanEntry 40 } + +astChanTransferCap OBJECT-TYPE + SYNTAX INTEGER { + Speech(0), + Digital(8), + RestrictedDigital(9), + Audio3k(16), + DigitalWithTones(17), + Video(24) + } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Transfer Capabilities for this channel." + ::= { astChanEntry 41 } + +astNumChanTypes OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Number of channel types (technologies) supported." + ::= { asteriskChannels 3 } + +astChanTypeTable OBJECT-TYPE + SYNTAX SEQUENCE OF AstChanTypeEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Table with details of the supported channel types." + ::= { asteriskChannels 4 } + +astChanTypeEntry OBJECT-TYPE + SYNTAX AstChanTypeEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "Information about a technology we support, including + how many channels are currently using this technology." + INDEX { astChanTypeIndex } + ::= { astChanTypeTable 1 } + +AstChanTypeEntry ::= SEQUENCE { + astChanTypeIndex Integer32, + astChanTypeName DisplayString, + astChanTypeDesc DisplayString, + astChanTypeDeviceState Integer32, + astChanTypeIndications Integer32, + astChanTypeTransfer Integer32, + astChanTypeChannels Gauge32 +} + +astChanTypeIndex OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Index into the table of channel types." + ::= { astChanTypeEntry 1 } + +astChanTypeName OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Unique name of the technology we are describing." + ::= { astChanTypeEntry 2 } + +astChanTypeDesc OBJECT-TYPE + SYNTAX DisplayString + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Description of the channel type (technology)." + ::= { astChanTypeEntry 3 } + +astChanTypeDeviceState OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Whether the current technology can hold device states." + ::= { astChanTypeEntry 4 } + +astChanTypeIndications OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Whether the current technology supports progress indication." + ::= { astChanTypeEntry 5 } + +astChanTypeTransfer OBJECT-TYPE + SYNTAX TruthValue + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Whether the current technology supports transfers, where + Asterisk can get out from inbetween two bridged channels." + ::= { astChanTypeEntry 6 } + +astChanTypeChannels OBJECT-TYPE + SYNTAX Gauge32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Number of active channels using the current technology." + ::= { astChanTypeEntry 7 } + +END diff --git a/mibs/DIGIUM-MIB b/mibs/DIGIUM-MIB new file mode 100644 index 000000000..018a080dd --- /dev/null +++ b/mibs/DIGIUM-MIB @@ -0,0 +1,17 @@ +DIGIUM-MIB DEFINITIONS ::= BEGIN + +IMPORTS + enterprises + FROM SNMPv2-SMI; + +digium MODULE-IDENTITY + LAST-UPDATED "200602041900Z" + ORGANIZATION "Digium, Inc." + CONTACT-INFO + "Mark Spencer + Email: markster@digium.com" + DESCRIPTION + "" + ::= { enterprises 22736 } + +END