From b68b6192a06e78dab8b53994f812d24f50874eb5 Mon Sep 17 00:00:00 2001 From: Aaron Daniels Date: Tue, 28 Jul 2015 07:17:53 +1000 Subject: [PATCH 1/3] Added Poller modules for Cisco Voice Routers Added the following modules: - Cisco PRI - graphs the total and inuse Primary Rate ISDN channels. - Cisco DSP - graphs the total and inuse Digital Signal Processor (DSP) resources. - Cisco MTP - graphs the total and inuse Media Termination Point (MTP) resources. - Cisco XCode - graphs the total and inuse Transcoder resources. --- html/includes/graphs/device/cisco-dsp.inc.php | 34 +++++++++++++++ .../graphs/device/cisco-hwmtp.inc.php | 34 +++++++++++++++ html/includes/graphs/device/cisco-pri.inc.php | 34 +++++++++++++++ .../graphs/device/cisco-xcode.inc.php | 34 +++++++++++++++ includes/defaults.inc.php | 4 ++ includes/definitions.inc.php | 16 +++++++ includes/polling/cisco-dsp.inc.php | 38 +++++++++++++++++ includes/polling/cisco-hwmtp.inc.php | 37 ++++++++++++++++ includes/polling/cisco-pri.inc.php | 42 +++++++++++++++++++ includes/polling/cisco-xcode.inc.php | 37 ++++++++++++++++ 10 files changed, 310 insertions(+) create mode 100644 html/includes/graphs/device/cisco-dsp.inc.php create mode 100644 html/includes/graphs/device/cisco-hwmtp.inc.php create mode 100644 html/includes/graphs/device/cisco-pri.inc.php create mode 100644 html/includes/graphs/device/cisco-xcode.inc.php create mode 100644 includes/polling/cisco-dsp.inc.php create mode 100644 includes/polling/cisco-hwmtp.inc.php create mode 100644 includes/polling/cisco-pri.inc.php create mode 100644 includes/polling/cisco-xcode.inc.php diff --git a/html/includes/graphs/device/cisco-dsp.inc.php b/html/includes/graphs/device/cisco-dsp.inc.php new file mode 100644 index 0000000000..7458ce424f --- /dev/null +++ b/html/includes/graphs/device/cisco-dsp.inc.php @@ -0,0 +1,34 @@ + + * + * 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-dsp.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-hwmtp.inc.php b/html/includes/graphs/device/cisco-hwmtp.inc.php new file mode 100644 index 0000000000..526964a1fe --- /dev/null +++ b/html/includes/graphs/device/cisco-hwmtp.inc.php @@ -0,0 +1,34 @@ + + * + * 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-hwmtp.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-pri.inc.php b/html/includes/graphs/device/cisco-pri.inc.php new file mode 100644 index 0000000000..29aa861abf --- /dev/null +++ b/html/includes/graphs/device/cisco-pri.inc.php @@ -0,0 +1,34 @@ + + * + * 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-pri.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-xcode.inc.php b/html/includes/graphs/device/cisco-xcode.inc.php new file mode 100644 index 0000000000..362e16ba4e --- /dev/null +++ b/html/includes/graphs/device/cisco-xcode.inc.php @@ -0,0 +1,34 @@ + + * + * 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-xcode.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 af6b937dc5..db07ce9f54 100644 --- a/includes/defaults.inc.php +++ b/includes/defaults.inc.php @@ -622,6 +622,10 @@ $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-pri'] = 1; +$config['poller_modules']['cisco-dsp'] = 1; +$config['poller_modules']['cisco-hwmtp'] = 1; +$config['poller_modules']['cisco-xcode'] = 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 62c418707a..91fc8d2593 100644 --- a/includes/definitions.inc.php +++ b/includes/definitions.inc.php @@ -1526,6 +1526,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-pri']['section'] = 'voice'; +$config['graph_types']['device']['cisco-pri']['order'] = '0'; +$config['graph_types']['device']['cisco-pri']['descr'] = 'PRI Utilisation'; + +$config['graph_types']['device']['cisco-dsp']['section'] = 'voice'; +$config['graph_types']['device']['cisco-dsp']['order'] = '0'; +$config['graph_types']['device']['cisco-dsp']['descr'] = 'DSP Utilisation'; + +$config['graph_types']['device']['cisco-hwmtp']['section'] = 'voice'; +$config['graph_types']['device']['cisco-hwmtp']['order'] = '0'; +$config['graph_types']['device']['cisco-hwmtp']['descr'] = 'Hardware MTP Utilisation'; + +$config['graph_types']['device']['cisco-xcode']['section'] = 'voice'; +$config['graph_types']['device']['cisco-xcode']['order'] = '0'; +$config['graph_types']['device']['cisco-xcode']['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-dsp.inc.php b/includes/polling/cisco-dsp.inc.php new file mode 100644 index 0000000000..20b2b9abf8 --- /dev/null +++ b/includes/polling/cisco-dsp.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-dsp.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-dsp'] = TRUE; + echo (" Cisco DSP "); + } + unset($rrd_filename, $total, $active); +} \ No newline at end of file diff --git a/includes/polling/cisco-hwmtp.inc.php b/includes/polling/cisco-hwmtp.inc.php new file mode 100644 index 0000000000..12b48f6b64 --- /dev/null +++ b/includes/polling/cisco-hwmtp.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-hwmtp.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-hwmtp'] = TRUE; + echo (" Cisco HW MTP "); + } + unset($rrd_filename, $total, $active, $available); +} \ No newline at end of file diff --git a/includes/polling/cisco-pri.inc.php b/includes/polling/cisco-pri.inc.php new file mode 100644 index 0000000000..a2c2835fd3 --- /dev/null +++ b/includes/polling/cisco-pri.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-pri.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-pri'] = TRUE; + echo (" Cisco PRI "); + } + unset($rrd_filename, $total, $active); +} \ No newline at end of file diff --git a/includes/polling/cisco-xcode.inc.php b/includes/polling/cisco-xcode.inc.php new file mode 100644 index 0000000000..b4b1f8096f --- /dev/null +++ b/includes/polling/cisco-xcode.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-xcode.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-xcode'] = TRUE; + echo (" Cisco Transcoder "); + } + unset($rrd_filename, $total, $active, $available); +} \ No newline at end of file From a327786835b0f4db076e5d7ea365876d0777f7ce Mon Sep 17 00:00:00 2001 From: Aaron Daniels Date: Fri, 31 Jul 2015 06:52:10 +1000 Subject: [PATCH 2/3] Change formatting to properly conform to the Coding guidelines. --- html/includes/graphs/device/cisco-dsp.inc.php | 5 ++--- html/includes/graphs/device/cisco-hwmtp.inc.php | 5 ++--- html/includes/graphs/device/cisco-pri.inc.php | 5 ++--- html/includes/graphs/device/cisco-xcode.inc.php | 5 ++--- 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/html/includes/graphs/device/cisco-dsp.inc.php b/html/includes/graphs/device/cisco-dsp.inc.php index 7458ce424f..bdbc41d642 100644 --- a/html/includes/graphs/device/cisco-dsp.inc.php +++ b/html/includes/graphs/device/cisco-dsp.inc.php @@ -11,12 +11,11 @@ * the source code distribution for details. */ -include("includes/graphs/common.inc.php"); +include "includes/graphs/common.inc.php"; $rrd_options .= " -l 0 -E "; $rrd_filename = $config['rrd_dir']."/".$device['hostname']."/cisco-dsp.rrd"; -if (file_exists($rrd_filename)) -{ +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 "; diff --git a/html/includes/graphs/device/cisco-hwmtp.inc.php b/html/includes/graphs/device/cisco-hwmtp.inc.php index 526964a1fe..aaede692b4 100644 --- a/html/includes/graphs/device/cisco-hwmtp.inc.php +++ b/html/includes/graphs/device/cisco-hwmtp.inc.php @@ -11,12 +11,11 @@ * the source code distribution for details. */ -include("includes/graphs/common.inc.php"); +include "includes/graphs/common.inc.php"; $rrd_options .= " -l 0 -E "; $rrd_filename = $config['rrd_dir']."/".$device['hostname']."/cisco-hwmtp.rrd"; -if (file_exists($rrd_filename)) -{ +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 "; diff --git a/html/includes/graphs/device/cisco-pri.inc.php b/html/includes/graphs/device/cisco-pri.inc.php index 29aa861abf..fc0c66d91d 100644 --- a/html/includes/graphs/device/cisco-pri.inc.php +++ b/html/includes/graphs/device/cisco-pri.inc.php @@ -11,12 +11,11 @@ * the source code distribution for details. */ -include("includes/graphs/common.inc.php"); +include "includes/graphs/common.inc.php"; $rrd_options .= " -l 0 -E "; $rrd_filename = $config['rrd_dir']."/".$device['hostname']."/cisco-pri.rrd"; -if (file_exists($rrd_filename)) -{ +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 "; diff --git a/html/includes/graphs/device/cisco-xcode.inc.php b/html/includes/graphs/device/cisco-xcode.inc.php index 362e16ba4e..6a71a09e33 100644 --- a/html/includes/graphs/device/cisco-xcode.inc.php +++ b/html/includes/graphs/device/cisco-xcode.inc.php @@ -11,12 +11,11 @@ * the source code distribution for details. */ -include("includes/graphs/common.inc.php"); +include "includes/graphs/common.inc.php"; $rrd_options .= " -l 0 -E "; $rrd_filename = $config['rrd_dir']."/".$device['hostname']."/cisco-xcode.rrd"; -if (file_exists($rrd_filename)) -{ +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 "; From 8379c963465794b7c7befcfb960a89f7050dfea8 Mon Sep 17 00:00:00 2001 From: Aaron Daniels Date: Sat, 1 Aug 2015 14:48:54 +1000 Subject: [PATCH 3/3] Merged separate modules into a single 'cisco-voice' module. Renamed each module to a more appropriate name. --- ...cisco-dsp.inc.php => cisco-iosdsp.inc.php} | 2 +- ...sco-hwmtp.inc.php => cisco-iosmtp.inc.php} | 2 +- ...cisco-pri.inc.php => cisco-iospri.inc.php} | 2 +- ...o-xcode.inc.php => cisco-iosxcode.inc.php} | 2 +- includes/defaults.inc.php | 5 +-- includes/definitions.inc.php | 24 +++++------ includes/polling/cisco-voice.inc.php | 40 +++++++++++++++++++ .../cisco-iosdsp.inc.php} | 6 +-- .../cisco-iosmtp.inc.php} | 6 +-- .../cisco-iospri.inc.php} | 6 +-- .../cisco-iosxcode.inc.php} | 6 +-- 11 files changed, 69 insertions(+), 32 deletions(-) rename html/includes/graphs/device/{cisco-dsp.inc.php => cisco-iosdsp.inc.php} (98%) rename html/includes/graphs/device/{cisco-hwmtp.inc.php => cisco-iosmtp.inc.php} (98%) rename html/includes/graphs/device/{cisco-pri.inc.php => cisco-iospri.inc.php} (98%) rename html/includes/graphs/device/{cisco-xcode.inc.php => cisco-iosxcode.inc.php} (98%) create mode 100644 includes/polling/cisco-voice.inc.php rename includes/polling/{cisco-dsp.inc.php => cisco-voice/cisco-iosdsp.inc.php} (91%) rename includes/polling/{cisco-hwmtp.inc.php => cisco-voice/cisco-iosmtp.inc.php} (91%) rename includes/polling/{cisco-pri.inc.php => cisco-voice/cisco-iospri.inc.php} (91%) rename includes/polling/{cisco-xcode.inc.php => cisco-voice/cisco-iosxcode.inc.php} (91%) diff --git a/html/includes/graphs/device/cisco-dsp.inc.php b/html/includes/graphs/device/cisco-iosdsp.inc.php similarity index 98% rename from html/includes/graphs/device/cisco-dsp.inc.php rename to html/includes/graphs/device/cisco-iosdsp.inc.php index bdbc41d642..41f0b0eda4 100644 --- a/html/includes/graphs/device/cisco-dsp.inc.php +++ b/html/includes/graphs/device/cisco-iosdsp.inc.php @@ -13,7 +13,7 @@ include "includes/graphs/common.inc.php"; $rrd_options .= " -l 0 -E "; -$rrd_filename = $config['rrd_dir']."/".$device['hostname']."/cisco-dsp.rrd"; +$rrd_filename = $config['rrd_dir']."/".$device['hostname']."/cisco-iosdsp.rrd"; if (file_exists($rrd_filename)) { $rrd_options .= " COMMENT:' Cur Min Max\\n'"; diff --git a/html/includes/graphs/device/cisco-hwmtp.inc.php b/html/includes/graphs/device/cisco-iosmtp.inc.php similarity index 98% rename from html/includes/graphs/device/cisco-hwmtp.inc.php rename to html/includes/graphs/device/cisco-iosmtp.inc.php index aaede692b4..f86b2a28d4 100644 --- a/html/includes/graphs/device/cisco-hwmtp.inc.php +++ b/html/includes/graphs/device/cisco-iosmtp.inc.php @@ -13,7 +13,7 @@ include "includes/graphs/common.inc.php"; $rrd_options .= " -l 0 -E "; -$rrd_filename = $config['rrd_dir']."/".$device['hostname']."/cisco-hwmtp.rrd"; +$rrd_filename = $config['rrd_dir']."/".$device['hostname']."/cisco-iosmtp.rrd"; if (file_exists($rrd_filename)) { $rrd_options .= " COMMENT:' Cur Min Max\\n'"; diff --git a/html/includes/graphs/device/cisco-pri.inc.php b/html/includes/graphs/device/cisco-iospri.inc.php similarity index 98% rename from html/includes/graphs/device/cisco-pri.inc.php rename to html/includes/graphs/device/cisco-iospri.inc.php index fc0c66d91d..c2e1000843 100644 --- a/html/includes/graphs/device/cisco-pri.inc.php +++ b/html/includes/graphs/device/cisco-iospri.inc.php @@ -13,7 +13,7 @@ include "includes/graphs/common.inc.php"; $rrd_options .= " -l 0 -E "; -$rrd_filename = $config['rrd_dir']."/".$device['hostname']."/cisco-pri.rrd"; +$rrd_filename = $config['rrd_dir']."/".$device['hostname']."/cisco-iospri.rrd"; if (file_exists($rrd_filename)) { $rrd_options .= " COMMENT:' Cur Min Max\\n'"; diff --git a/html/includes/graphs/device/cisco-xcode.inc.php b/html/includes/graphs/device/cisco-iosxcode.inc.php similarity index 98% rename from html/includes/graphs/device/cisco-xcode.inc.php rename to html/includes/graphs/device/cisco-iosxcode.inc.php index 6a71a09e33..6ed9b766b1 100644 --- a/html/includes/graphs/device/cisco-xcode.inc.php +++ b/html/includes/graphs/device/cisco-iosxcode.inc.php @@ -13,7 +13,7 @@ include "includes/graphs/common.inc.php"; $rrd_options .= " -l 0 -E "; -$rrd_filename = $config['rrd_dir']."/".$device['hostname']."/cisco-xcode.rrd"; +$rrd_filename = $config['rrd_dir']."/".$device['hostname']."/cisco-iosxcode.rrd"; if (file_exists($rrd_filename)) { $rrd_options .= " COMMENT:' Cur Min Max\\n'"; diff --git a/includes/defaults.inc.php b/includes/defaults.inc.php index 06f6626438..6563e76e7c 100644 --- a/includes/defaults.inc.php +++ b/includes/defaults.inc.php @@ -660,10 +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-pri'] = 1; -$config['poller_modules']['cisco-dsp'] = 1; -$config['poller_modules']['cisco-hwmtp'] = 1; -$config['poller_modules']['cisco-xcode'] = 1; +$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 e03273b6fc..ec41eb09ba 100644 --- a/includes/definitions.inc.php +++ b/includes/definitions.inc.php @@ -1538,21 +1538,21 @@ $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-pri']['section'] = 'voice'; -$config['graph_types']['device']['cisco-pri']['order'] = '0'; -$config['graph_types']['device']['cisco-pri']['descr'] = 'PRI Utilisation'; +$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-dsp']['section'] = 'voice'; -$config['graph_types']['device']['cisco-dsp']['order'] = '0'; -$config['graph_types']['device']['cisco-dsp']['descr'] = 'DSP 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-hwmtp']['section'] = 'voice'; -$config['graph_types']['device']['cisco-hwmtp']['order'] = '0'; -$config['graph_types']['device']['cisco-hwmtp']['descr'] = 'Hardware MTP 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-xcode']['section'] = 'voice'; -$config['graph_types']['device']['cisco-xcode']['order'] = '0'; -$config['graph_types']['device']['cisco-xcode']['descr'] = 'Transcoder 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 0000000000..fc47397465 --- /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-dsp.inc.php b/includes/polling/cisco-voice/cisco-iosdsp.inc.php similarity index 91% rename from includes/polling/cisco-dsp.inc.php rename to includes/polling/cisco-voice/cisco-iosdsp.inc.php index 20b2b9abf8..963afd5090 100644 --- a/includes/polling/cisco-dsp.inc.php +++ b/includes/polling/cisco-voice/cisco-iosdsp.inc.php @@ -25,14 +25,14 @@ if ($device['os_group'] == "cisco") { $active += $value['']; } - $rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename ("cisco-dsp.rrd"); + $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-dsp'] = TRUE; - echo (" Cisco DSP "); + $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-hwmtp.inc.php b/includes/polling/cisco-voice/cisco-iosmtp.inc.php similarity index 91% rename from includes/polling/cisco-hwmtp.inc.php rename to includes/polling/cisco-voice/cisco-iosmtp.inc.php index 12b48f6b64..01d2340160 100644 --- a/includes/polling/cisco-hwmtp.inc.php +++ b/includes/polling/cisco-voice/cisco-iosmtp.inc.php @@ -24,14 +24,14 @@ if ($device['os_group'] == "cisco") { // Active $active = $total - $available; - $rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename ("cisco-hwmtp.rrd"); + $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-hwmtp'] = TRUE; - echo (" Cisco HW MTP "); + $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-pri.inc.php b/includes/polling/cisco-voice/cisco-iospri.inc.php similarity index 91% rename from includes/polling/cisco-pri.inc.php rename to includes/polling/cisco-voice/cisco-iospri.inc.php index a2c2835fd3..91c77ca351 100644 --- a/includes/polling/cisco-pri.inc.php +++ b/includes/polling/cisco-voice/cisco-iospri.inc.php @@ -28,15 +28,15 @@ if ($device['os_group'] == "cisco") { $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-pri.rrd"); + $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-pri'] = TRUE; - echo (" Cisco PRI "); + $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-xcode.inc.php b/includes/polling/cisco-voice/cisco-iosxcode.inc.php similarity index 91% rename from includes/polling/cisco-xcode.inc.php rename to includes/polling/cisco-voice/cisco-iosxcode.inc.php index b4b1f8096f..e3b9799cdd 100644 --- a/includes/polling/cisco-xcode.inc.php +++ b/includes/polling/cisco-voice/cisco-iosxcode.inc.php @@ -24,14 +24,14 @@ if ($device['os_group'] == "cisco") { // Active $active = $total - $available; - $rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename ("cisco-xcode.rrd"); + $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-xcode'] = TRUE; - echo (" Cisco Transcoder "); + $graphs['cisco-iosxcode'] = TRUE; + echo (" Cisco IOS Transcoder "); } unset($rrd_filename, $total, $active, $available); } \ No newline at end of file