mirror of
https://github.com/librenms/librenms.git
synced 2024-09-29 14:26:25 +00:00
Merge pull request #1565 from adaniels21487/issue-1540
Issue 1540 - Add support for Cisco Voice Gateways
This commit is contained in:
commit
3227156599
33
html/includes/graphs/device/cisco-iosdsp.inc.php
Normal file
33
html/includes/graphs/device/cisco-iosdsp.inc.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS module to Graph Digital Signal Processor (DSP) Resources in a Cisco Voice Router
|
||||
*
|
||||
* Copyright (c) 2015 Aaron Daniels <aaron@daniels.id.au>
|
||||
*
|
||||
* 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 ";
|
||||
}
|
33
html/includes/graphs/device/cisco-iosmtp.inc.php
Normal file
33
html/includes/graphs/device/cisco-iosmtp.inc.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS module to Graph Hardware MTP Resources in a Cisco Voice Router
|
||||
*
|
||||
* Copyright (c) 2015 Aaron Daniels <aaron@daniels.id.au>
|
||||
*
|
||||
* 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 ";
|
||||
}
|
33
html/includes/graphs/device/cisco-iospri.inc.php
Normal file
33
html/includes/graphs/device/cisco-iospri.inc.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS module to Graph Primary Rate ISDN Resources in a Cisco Voice Router
|
||||
*
|
||||
* Copyright (c) 2015 Aaron Daniels <aaron@daniels.id.au>
|
||||
*
|
||||
* 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 ";
|
||||
}
|
33
html/includes/graphs/device/cisco-iosxcode.inc.php
Normal file
33
html/includes/graphs/device/cisco-iosxcode.inc.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS module to Graph Transcoder Resources in a Cisco Voice Router
|
||||
*
|
||||
* Copyright (c) 2015 Aaron Daniels <aaron@daniels.id.au>
|
||||
*
|
||||
* 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 ";
|
||||
}
|
@ -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.
|
||||
|
@ -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.';
|
||||
|
||||
|
40
includes/polling/cisco-voice.inc.php
Normal file
40
includes/polling/cisco-voice.inc.php
Normal file
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS module to Graph Cisco Voice components.
|
||||
*
|
||||
* Copyright (c) 2015 Aaron Daniels <aaron@daniels.id.au>
|
||||
*
|
||||
* 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";
|
||||
|
||||
}
|
38
includes/polling/cisco-voice/cisco-iosdsp.inc.php
Normal file
38
includes/polling/cisco-voice/cisco-iosdsp.inc.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS module to Graph Digital Signal Processor (DSP) Resources in a Cisco Voice Router
|
||||
*
|
||||
* Copyright (c) 2015 Aaron Daniels <aaron@daniels.id.au>
|
||||
*
|
||||
* 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);
|
||||
}
|
37
includes/polling/cisco-voice/cisco-iosmtp.inc.php
Normal file
37
includes/polling/cisco-voice/cisco-iosmtp.inc.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS module to Graph Hardware MTP Resources in a Cisco Voice Router
|
||||
*
|
||||
* Copyright (c) 2015 Aaron Daniels <aaron@daniels.id.au>
|
||||
*
|
||||
* 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);
|
||||
}
|
42
includes/polling/cisco-voice/cisco-iospri.inc.php
Normal file
42
includes/polling/cisco-voice/cisco-iospri.inc.php
Normal file
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS module to Graph Primary Rate ISDN Resources in a Cisco Voice Router
|
||||
*
|
||||
* Copyright (c) 2015 Aaron Daniels <aaron@daniels.id.au>
|
||||
*
|
||||
* 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);
|
||||
}
|
37
includes/polling/cisco-voice/cisco-iosxcode.inc.php
Normal file
37
includes/polling/cisco-voice/cisco-iosxcode.inc.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS module to Graph Transcoder Resources in a Cisco Voice Router
|
||||
*
|
||||
* Copyright (c) 2015 Aaron Daniels <aaron@daniels.id.au>
|
||||
*
|
||||
* 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);
|
||||
}
|
Loading…
Reference in New Issue
Block a user