diff --git a/html/includes/graphs/device/cisco-iosdsp.inc.php b/html/includes/graphs/device/cisco-iosdsp.inc.php new file mode 100644 index 000000000..41f0b0eda --- /dev/null +++ b/html/includes/graphs/device/cisco-iosdsp.inc.php @@ -0,0 +1,33 @@ + + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. Please see LICENSE.txt at the top level of + * the source code distribution for details. + */ + +include "includes/graphs/common.inc.php"; +$rrd_options .= " -l 0 -E "; +$rrd_filename = $config['rrd_dir']."/".$device['hostname']."/cisco-iosdsp.rrd"; + +if (file_exists($rrd_filename)) { + $rrd_options .= " COMMENT:' Cur Min Max\\n'"; + $rrd_options .= " DEF:Total=" . $rrd_filename . ":total:AVERAGE "; + $rrd_options .= " AREA:Total#c099ff "; + $rrd_options .= " LINE1.25:Total#0000ee:'DSPs total ' "; + $rrd_options .= " GPRINT:Total:LAST:%3.0lf "; + $rrd_options .= " GPRINT:Total:MIN:%3.0lf "; + $rrd_options .= " GPRINT:Total:MAX:%3.0lf\\\l "; + + $rrd_options .= " DEF:Active=" . $rrd_filename . ":active:AVERAGE "; + $rrd_options .= " AREA:Active#aaff99 "; + $rrd_options .= " LINE1.25:Active#00ee00:'DSPs in use ' "; + $rrd_options .= " GPRINT:Active:LAST:%3.0lf "; + $rrd_options .= " GPRINT:Active:MIN:%3.0lf "; + $rrd_options .= " GPRINT:Active:MAX:%3.0lf\\\l "; +} \ No newline at end of file diff --git a/html/includes/graphs/device/cisco-iosmtp.inc.php b/html/includes/graphs/device/cisco-iosmtp.inc.php new file mode 100644 index 000000000..f86b2a28d --- /dev/null +++ b/html/includes/graphs/device/cisco-iosmtp.inc.php @@ -0,0 +1,33 @@ + + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. Please see LICENSE.txt at the top level of + * the source code distribution for details. + */ + +include "includes/graphs/common.inc.php"; +$rrd_options .= " -l 0 -E "; +$rrd_filename = $config['rrd_dir']."/".$device['hostname']."/cisco-iosmtp.rrd"; + +if (file_exists($rrd_filename)) { + $rrd_options .= " COMMENT:' Cur Min Max\\n'"; + $rrd_options .= " DEF:Total=" . $rrd_filename . ":total:AVERAGE "; + $rrd_options .= " AREA:Total#c099ff "; + $rrd_options .= " LINE1.25:Total#0000ee:'Hardware MTP total ' "; + $rrd_options .= " GPRINT:Total:LAST:%3.0lf "; + $rrd_options .= " GPRINT:Total:MIN:%3.0lf "; + $rrd_options .= " GPRINT:Total:MAX:%3.0lf\\\l "; + + $rrd_options .= " DEF:Active=" . $rrd_filename . ":active:AVERAGE "; + $rrd_options .= " AREA:Active#aaff99 "; + $rrd_options .= " LINE1.25:Active#00ee00:'Hardware MTP in use ' "; + $rrd_options .= " GPRINT:Active:LAST:%3.0lf "; + $rrd_options .= " GPRINT:Active:MIN:%3.0lf "; + $rrd_options .= " GPRINT:Active:MAX:%3.0lf\\\l "; +} \ No newline at end of file diff --git a/html/includes/graphs/device/cisco-iospri.inc.php b/html/includes/graphs/device/cisco-iospri.inc.php new file mode 100644 index 000000000..c2e100084 --- /dev/null +++ b/html/includes/graphs/device/cisco-iospri.inc.php @@ -0,0 +1,33 @@ + + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. Please see LICENSE.txt at the top level of + * the source code distribution for details. + */ + +include "includes/graphs/common.inc.php"; +$rrd_options .= " -l 0 -E "; +$rrd_filename = $config['rrd_dir']."/".$device['hostname']."/cisco-iospri.rrd"; + +if (file_exists($rrd_filename)) { + $rrd_options .= " COMMENT:' Cur Min Max\\n'"; + $rrd_options .= " DEF:Total=" . $rrd_filename . ":total:AVERAGE "; + $rrd_options .= " AREA:Total#c099ff "; + $rrd_options .= " LINE1.25:Total#0000ee:'PRI Channels total ' "; + $rrd_options .= " GPRINT:Total:LAST:%3.0lf "; + $rrd_options .= " GPRINT:Total:MIN:%3.0lf "; + $rrd_options .= " GPRINT:Total:MAX:%3.0lf\\\l "; + + $rrd_options .= " DEF:Active=" . $rrd_filename . ":active:AVERAGE "; + $rrd_options .= " AREA:Active#aaff99 "; + $rrd_options .= " LINE1.25:Active#00ee00:'PRI Channels in use ' "; + $rrd_options .= " GPRINT:Active:LAST:%3.0lf "; + $rrd_options .= " GPRINT:Active:MIN:%3.0lf "; + $rrd_options .= " GPRINT:Active:MAX:%3.0lf\\\l "; +} \ No newline at end of file diff --git a/html/includes/graphs/device/cisco-iosxcode.inc.php b/html/includes/graphs/device/cisco-iosxcode.inc.php new file mode 100644 index 000000000..6ed9b766b --- /dev/null +++ b/html/includes/graphs/device/cisco-iosxcode.inc.php @@ -0,0 +1,33 @@ + + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. Please see LICENSE.txt at the top level of + * the source code distribution for details. + */ + +include "includes/graphs/common.inc.php"; +$rrd_options .= " -l 0 -E "; +$rrd_filename = $config['rrd_dir']."/".$device['hostname']."/cisco-iosxcode.rrd"; + +if (file_exists($rrd_filename)) { + $rrd_options .= " COMMENT:' Cur Min Max\\n'"; + $rrd_options .= " DEF:Total=" . $rrd_filename . ":total:AVERAGE "; + $rrd_options .= " AREA:Total#c099ff "; + $rrd_options .= " LINE1.25:Total#0000ee:'Transcoder Resources Total ' "; + $rrd_options .= " GPRINT:Total:LAST:%3.0lf "; + $rrd_options .= " GPRINT:Total:MIN:%3.0lf "; + $rrd_options .= " GPRINT:Total:MAX:%3.0lf\\\l "; + + $rrd_options .= " DEF:Active=" . $rrd_filename . ":active:AVERAGE "; + $rrd_options .= " AREA:Active#aaff99 "; + $rrd_options .= " LINE1.25:Active#00ee00:'Transcoder Resources in use ' "; + $rrd_options .= " GPRINT:Active:LAST:%3.0lf "; + $rrd_options .= " GPRINT:Active:MIN:%3.0lf "; + $rrd_options .= " GPRINT:Active:MAX:%3.0lf\\\l "; +} \ No newline at end of file diff --git a/includes/defaults.inc.php b/includes/defaults.inc.php index 332c758c4..1bb2c00a1 100644 --- a/includes/defaults.inc.php +++ b/includes/defaults.inc.php @@ -660,6 +660,7 @@ $config['poller_modules']['entity-physical'] = 1; $config['poller_modules']['applications'] = 1; $config['poller_modules']['cisco-asa-firewall'] = 1; $config['poller_modules']['mib'] = 0; +$config['poller_modules']['cisco-voice'] = 1; // List of discovery modules. Need to be in this array to be // considered for execution. diff --git a/includes/definitions.inc.php b/includes/definitions.inc.php index b0116bfb0..ec41eb09b 100644 --- a/includes/definitions.inc.php +++ b/includes/definitions.inc.php @@ -1538,6 +1538,22 @@ $config['graph_types']['device']['asa_conns']['section'] = 'firewall'; $config['graph_types']['device']['asa_conns']['order'] = '0'; $config['graph_types']['device']['asa_conns']['descr'] = 'Current connections'; +$config['graph_types']['device']['cisco-iospri']['section'] = 'voice'; +$config['graph_types']['device']['cisco-iospri']['order'] = '0'; +$config['graph_types']['device']['cisco-iospri']['descr'] = 'PRI Utilisation'; + +$config['graph_types']['device']['cisco-iosdsp']['section'] = 'voice'; +$config['graph_types']['device']['cisco-iosdsp']['order'] = '0'; +$config['graph_types']['device']['cisco-iosdsp']['descr'] = 'DSP Utilisation'; + +$config['graph_types']['device']['cisco-iosmtp']['section'] = 'voice'; +$config['graph_types']['device']['cisco-iosmtp']['order'] = '0'; +$config['graph_types']['device']['cisco-iosmtp']['descr'] = 'Hardware MTP Utilisation'; + +$config['graph_types']['device']['cisco-iosxcode']['section'] = 'voice'; +$config['graph_types']['device']['cisco-iosxcode']['order'] = '0'; +$config['graph_types']['device']['cisco-iosxcode']['descr'] = 'Transcoder Utilisation'; + $config['graph_descr']['device_smokeping_in_all'] = 'This is an aggregate graph of the incoming smokeping tests to this host. The line corresponds to the average RTT. The shaded area around each line denotes the standard deviation.'; $config['graph_descr']['device_processor'] = 'This is an aggregate graph of all processors in the system.'; diff --git a/includes/polling/cisco-voice.inc.php b/includes/polling/cisco-voice.inc.php new file mode 100644 index 000000000..fc4739746 --- /dev/null +++ b/includes/polling/cisco-voice.inc.php @@ -0,0 +1,40 @@ + + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. Please see LICENSE.txt at the top level of + * the source code distribution for details. + */ + +if ($device['os_group'] == "cisco") { + + /* + * Cisco PRI + * This module graphs the used and total DS0 channels on a Cisco Voice Gateway + */ + include "cisco-voice/cisco-iospri.inc.php"; + + /* + * Cisco DSP + * This module graphs the used and total DSP resources on a Cisco Voice Gateway + */ + include "cisco-voice/cisco-iosdsp.inc.php"; + + /* + * Cisco MTP + * This module graphs the used and total MTP resources on a Cisco Voice Gateway + */ + include "cisco-voice/cisco-iosmtp.inc.php"; + + /* + * Cisco XCode + * This module graphs the used and total Transcoder resources on a Cisco Voice Gateway + */ + include "cisco-voice/cisco-xcode.inc.php"; + +} \ No newline at end of file diff --git a/includes/polling/cisco-voice/cisco-iosdsp.inc.php b/includes/polling/cisco-voice/cisco-iosdsp.inc.php new file mode 100644 index 000000000..963afd509 --- /dev/null +++ b/includes/polling/cisco-voice/cisco-iosdsp.inc.php @@ -0,0 +1,38 @@ + + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. Please see LICENSE.txt at the top level of + * the source code distribution for details. + */ + +if ($device['os_group'] == "cisco") { + // Total + $total = 0; + foreach (snmpwalk_cache_oid_num ($device, "1.3.6.1.4.1.9.9.86.1.2.1.1.6", NULL) as $key => $value) { + $total += $value['']; + } + + if (isset($total) && ($total != "") && ($total != 0)) { + // Active + $active = 0; + foreach ( snmpwalk_cache_oid_num ($device, "1.3.6.1.4.1.9.9.86.1.2.1.1.7", NULL) as $key => $value) { + $active += $value['']; + } + + $rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename ("cisco-iosdsp.rrd"); + if (!file_exists ($rrd_filename)) { + rrdtool_create ($rrd_filename, " DS:total:GAUGE:600:0:U DS:active:GAUGE:600:0:U" . $config['rrd_rra']); + } + rrdtool_update ($rrd_filename, "N:" . $total . ":" . $active); + + $graphs['cisco-iosdsp'] = TRUE; + echo (" Cisco IOS DSP "); + } + unset($rrd_filename, $total, $active); +} \ No newline at end of file diff --git a/includes/polling/cisco-voice/cisco-iosmtp.inc.php b/includes/polling/cisco-voice/cisco-iosmtp.inc.php new file mode 100644 index 000000000..01d234016 --- /dev/null +++ b/includes/polling/cisco-voice/cisco-iosmtp.inc.php @@ -0,0 +1,37 @@ + + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. Please see LICENSE.txt at the top level of + * the source code distribution for details. + */ + +if ($device['os_group'] == "cisco") { + // Total + $total = snmpwalk_cache_oid_num ($device, "1.3.6.1.4.1.9.9.86.1.6.4.1.3", NULL); + $total = $total['1.3.6.1.4.1.9.9.86.1.6.4.1.3']['']; + + if (isset($total) && ($total != "") && ($total != 0)) { + // Available + $available = snmpwalk_cache_oid_num ($device, "1.3.6.1.4.1.9.9.86.1.6.4.1.4", NULL); + $available = $available['1.3.6.1.4.1.9.9.86.1.6.4.1.4']['']; + + // Active + $active = $total - $available; + + $rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename ("cisco-iosmtp.rrd"); + if (!file_exists ($rrd_filename)) { + rrdtool_create ($rrd_filename, " DS:total:GAUGE:600:0:U DS:active:GAUGE:600:0:U" . $config['rrd_rra']); + } + rrdtool_update ($rrd_filename, "N:" . $total . ":" . $active); + + $graphs['cisco-iosmtp'] = TRUE; + echo (" Cisco IOS MTP "); + } + unset($rrd_filename, $total, $active, $available); +} \ No newline at end of file diff --git a/includes/polling/cisco-voice/cisco-iospri.inc.php b/includes/polling/cisco-voice/cisco-iospri.inc.php new file mode 100644 index 000000000..91c77ca35 --- /dev/null +++ b/includes/polling/cisco-voice/cisco-iospri.inc.php @@ -0,0 +1,42 @@ + + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. Please see LICENSE.txt at the top level of + * the source code distribution for details. + */ + +if ($device['os_group'] == "cisco") { + // TODO: Need to test partial PRI. + + // Total + $total = 0; + foreach ( snmpwalk_cache_oid_num ($device, "1.3.6.1.2.1.2.2.1.3", NULL) as $key => $value) { + // 81 is the ifType for DS0's + if ($value[''] == "81") { + $total++; + } + } + + // Active + $active = snmpwalk_cache_oid_num ($device, "1.3.6.1.4.1.9.10.19.1.1.4.0", NULL); + $active = $active['1.3.6.1.4.1.9.10.19.1.1.4.0']['']; + + if (isset($active) && ($active != "") && ($total != 0)) { + $rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename ("cisco-iospri.rrd"); + + if (!file_exists ($rrd_filename)) { + rrdtool_create ($rrd_filename, " DS:total:GAUGE:600:0:U DS:active:GAUGE:600:0:U" . $config['rrd_rra']); + } + rrdtool_update ($rrd_filename, "N:" . $total . ":" . $active); + + $graphs['cisco-iospri'] = TRUE; + echo (" Cisco IOS PRI "); + } + unset($rrd_filename, $total, $active); +} \ No newline at end of file diff --git a/includes/polling/cisco-voice/cisco-iosxcode.inc.php b/includes/polling/cisco-voice/cisco-iosxcode.inc.php new file mode 100644 index 000000000..e3b9799cd --- /dev/null +++ b/includes/polling/cisco-voice/cisco-iosxcode.inc.php @@ -0,0 +1,37 @@ + + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. Please see LICENSE.txt at the top level of + * the source code distribution for details. + */ + +if ($device['os_group'] == "cisco") { + // Total + $total = snmpwalk_cache_oid_num ($device, "1.3.6.1.4.1.9.9.86.1.7.1.0", NULL); + $total = $total['1.3.6.1.4.1.9.9.86.1.7.1.0']['']; + + if (isset($total) && ($total != "") && ($total != 0)) { + // Available + $available = snmpwalk_cache_oid_num ($device, "1.3.6.1.4.1.9.9.86.1.7.2.0", NULL); + $available = $available['1.3.6.1.4.1.9.9.86.1.7.2.0']['']; + + // Active + $active = $total - $available; + + $rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename ("cisco-iosxcode.rrd"); + if (!file_exists ($rrd_filename)) { + rrdtool_create ($rrd_filename, " DS:total:GAUGE:600:0:U DS:active:GAUGE:600:0:U" . $config['rrd_rra']); + } + rrdtool_update ($rrd_filename, "N:" . $total . ":" . $active); + + $graphs['cisco-iosxcode'] = TRUE; + echo (" Cisco IOS Transcoder "); + } + unset($rrd_filename, $total, $active, $available); +} \ No newline at end of file