Files
librenms-librenms/includes/html/pages/device/apps/asterisk.inc.php
Joseph Tingiris 02bc15c206 Asterisk app: add IAX2 peer graphs (#11078)
* Asterisk app: add IAX2 peer graphs

* It's an entirely new graph and will not break existing graphs.
* The asterisk extend script must be updated to provide the appropriate poller data.
* The PR for librenms-agent/snmp/asterisk is here: https://github.com/librenms/librenms-agent/pull/274

* code climate, round 1

* clarified unit text

* code climate, round 2

* changes needed to properly generate test data

* linux_asterisk-v1 test data
2020-02-03 18:47:27 +01:00

24 lines
864 B
PHP

<?php
$asterisk_graphs = array(
'asterisk_calls' => 'Asterisk - Calls',
'asterisk_channels' => 'Asterisk - Channels',
'asterisk_sip' => 'Asterisk - SIP Peers',
'asterisk_iax2' => 'Asterisk - IAX2 Peers'
);
foreach ($asterisk_graphs as $asterisk_graphs_key => $asterisk_graphs_value) {
$graph_type = $asterisk_graphs_key;
$graph_array['height'] = '100';
$graph_array['id'] = $app['app_id'];
$graph_array['to'] = \LibreNMS\Config::get('time.now');
$graph_array['type'] = 'application_'.$asterisk_graphs_key;
$graph_array['width'] = '215';
echo '<div class="panel panel-default">
<div class="panel-heading"><h3 class="panel-title">'.$asterisk_graphs_value.'</h3></div>
<div class="panel-body"><div class="row">';
include 'includes/html/print-graphrow.inc.php';
echo '</div></div></div></div>';
}