mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Icecast, Opensips and Voip monitor Application (#12070)
* Icecast added * Opensips added * Voip Monitor added * Icecast documentation Icecast corrections * Opensips documentation added Opensips corrections * Voip monitor documentation added Voip monitor corrections * Icecast corrections * Opensips corrections * Voip monitor corrections * test data added for icecast * test data added for opensips
This commit is contained in:
26
includes/html/graphs/application/icecast_cpuload.inc.php
Normal file
26
includes/html/graphs/application/icecast_cpuload.inc.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
$scale_min = 0;
|
||||
$scale_max = 1;
|
||||
|
||||
require 'includes/html/graphs/common.inc.php';
|
||||
|
||||
$icecast_rrd = rrd_name($device['hostname'], array('app', 'icecast', $app['app_id']));
|
||||
|
||||
if (rrdtool_check_rrd_exists($icecast_rrd)) {
|
||||
$rrd_filename = $icecast_rrd;
|
||||
}
|
||||
|
||||
|
||||
$ds = 'cpu';
|
||||
|
||||
$colour_area = 'F0E68C';
|
||||
$colour_line = 'FF4500';
|
||||
|
||||
$colour_area_max = 'FFEE99';
|
||||
|
||||
$graph_max = 100;
|
||||
|
||||
$unit_text = '% Used';
|
||||
|
||||
require 'includes/html/graphs/generic_simplex.inc.php';
|
25
includes/html/graphs/application/icecast_memoryusage.inc.php
Normal file
25
includes/html/graphs/application/icecast_memoryusage.inc.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
$scale_min = 1000;
|
||||
|
||||
require 'includes/html/graphs/common.inc.php';
|
||||
|
||||
$icecast_rrd = rrd_name($device['hostname'], array('app', 'icecast', $app['app_id']));
|
||||
|
||||
if (rrdtool_check_rrd_exists($icecast_rrd)) {
|
||||
$rrd_filename = $icecast_rrd;
|
||||
}
|
||||
|
||||
|
||||
$ds = 'kbyte';
|
||||
|
||||
$colour_area = 'F0E68C';
|
||||
$colour_line = 'FF4500';
|
||||
|
||||
$colour_area_max = 'FFEE99';
|
||||
|
||||
$graph_max = 1000000;
|
||||
|
||||
$unit_text = 'bytes';
|
||||
|
||||
require 'includes/html/graphs/generic_simplex.inc.php';
|
24
includes/html/graphs/application/icecast_openfiles.inc.php
Normal file
24
includes/html/graphs/application/icecast_openfiles.inc.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
$scale_min = 1000;
|
||||
|
||||
require 'includes/html/graphs/common.inc.php';
|
||||
|
||||
$icecast_rrd = rrd_name($device['hostname'], array('app', 'icecast', $app['app_id']));
|
||||
|
||||
if (rrdtool_check_rrd_exists($icecast_rrd)) {
|
||||
$rrd_filename = $icecast_rrd;
|
||||
}
|
||||
|
||||
$ds = 'openfiles';
|
||||
|
||||
$colour_area = 'F0E68C';
|
||||
$colour_line = 'FF4500';
|
||||
|
||||
$colour_area_max = 'FFEE99';
|
||||
|
||||
$graph_max = 1000000;
|
||||
|
||||
$unit_text = 'Open files';
|
||||
|
||||
require 'includes/html/graphs/generic_simplex.inc.php';
|
29
includes/html/graphs/application/opensips_load.inc.php
Normal file
29
includes/html/graphs/application/opensips_load.inc.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
$scale_min = 0;
|
||||
|
||||
$scale_max = 1;
|
||||
|
||||
require 'includes/html/graphs/common.inc.php';
|
||||
|
||||
$opensips_rrd = rrd_name($device['hostname'], array('app', 'opensips', $app['app_id']));
|
||||
|
||||
|
||||
if (rrdtool_check_rrd_exists($opensips_rrd)) {
|
||||
$rrd_filename = $opensips_rrd;
|
||||
}
|
||||
|
||||
|
||||
$ds = 'load';
|
||||
|
||||
$colour_area = 'F0E68C';
|
||||
$colour_line = 'FF4500';
|
||||
|
||||
$colour_area_max = 'FFEE99';
|
||||
|
||||
$graph_max = 1000;
|
||||
$graph_min = 1;
|
||||
|
||||
$unit_text = 'Load Average %';
|
||||
|
||||
require 'includes/html/graphs/generic_simplex.inc.php';
|
36
includes/html/graphs/application/opensips_memory.inc.php
Normal file
36
includes/html/graphs/application/opensips_memory.inc.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
require 'includes/html/graphs/common.inc.php';
|
||||
$descr_len = 20;
|
||||
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', 'opensips', $app['app_id']));
|
||||
|
||||
$array = array(
|
||||
'total_memory' => array(
|
||||
'descr' => 'Total',
|
||||
'colour' => '22FF22',
|
||||
),
|
||||
'used_memory' => array(
|
||||
'descr' => 'Used',
|
||||
'colour' => '0022FF',
|
||||
),
|
||||
);
|
||||
|
||||
$i = 0;
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
foreach ($array as $ds => $var) {
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = $var['descr'];
|
||||
$rrd_list[$i]['ds'] = $ds;
|
||||
// $rrd_list[$i]['colour'] = $var['colour'];
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
echo "file missing: $file";
|
||||
}
|
||||
|
||||
$colours = 'mixed';
|
||||
$nototal = 1;
|
||||
$unit_text = 'bytes';
|
||||
|
||||
require 'includes/html/graphs/generic_multi_line.inc.php';
|
24
includes/html/graphs/application/opensips_openfiles.inc.php
Normal file
24
includes/html/graphs/application/opensips_openfiles.inc.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
$scale_min = 1000;
|
||||
|
||||
require 'includes/html/graphs/common.inc.php';
|
||||
|
||||
$opensips_rrd = rrd_name($device['hostname'], array('app', 'opensips', $app['app_id']));
|
||||
|
||||
if (rrdtool_check_rrd_exists($opensips_rrd)) {
|
||||
$rrd_filename = $opensips_rrd;
|
||||
}
|
||||
|
||||
$ds = 'openfiles';
|
||||
|
||||
$colour_area = 'F0E68C';
|
||||
$colour_line = 'FF4500';
|
||||
|
||||
$colour_area_max = 'FFEE99';
|
||||
|
||||
$graph_max = 1000000;
|
||||
|
||||
$unit_text = 'Open files';
|
||||
|
||||
require 'includes/html/graphs/generic_simplex.inc.php';
|
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
$scale_min = 0;
|
||||
$scale_max = 1;
|
||||
|
||||
require 'includes/html/graphs/common.inc.php';
|
||||
|
||||
$voip_monitor_rrd = rrd_name($device['hostname'], array('app', 'voip-monitor', $app['app_id']));
|
||||
|
||||
if (rrdtool_check_rrd_exists($voip_monitor_rrd)) {
|
||||
$rrd_filename = $voip_monitor_rrd;
|
||||
}
|
||||
|
||||
$ds = 'cpu';
|
||||
|
||||
$colour_area = 'F0E68C';
|
||||
$colour_line = 'FF4500';
|
||||
|
||||
$colour_area_max = 'FFEE99';
|
||||
|
||||
$graph_max = 100;
|
||||
|
||||
$unit_text = '% Used';
|
||||
|
||||
require 'includes/html/graphs/generic_simplex.inc.php';
|
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
$scale_min = 1000;
|
||||
|
||||
require 'includes/html/graphs/common.inc.php';
|
||||
|
||||
$voip_monitor_rrd = rrd_name($device['hostname'], array('app', 'voip-monitor', $app['app_id']));
|
||||
|
||||
if (rrdtool_check_rrd_exists($voip_monitor_rrd)) {
|
||||
$rrd_filename = $voip_monitor_rrd;
|
||||
}
|
||||
|
||||
$ds = 'kbyte';
|
||||
|
||||
$colour_area = 'F0E68C';
|
||||
$colour_line = 'FF4500';
|
||||
|
||||
$colour_area_max = 'FFEE99';
|
||||
|
||||
$graph_max = 1000000;
|
||||
|
||||
$unit_text = 'bytes';
|
||||
|
||||
require 'includes/html/graphs/generic_simplex.inc.php';
|
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
$scale_min = 1000;
|
||||
|
||||
require 'includes/html/graphs/common.inc.php';
|
||||
|
||||
$voip_monitor_rrd = rrd_name($device['hostname'], array('app', 'voip-monitor', $app['app_id']));
|
||||
|
||||
if (rrdtool_check_rrd_exists($voip_monitor_rrd)) {
|
||||
$rrd_filename = $voip_monitor_rrd;
|
||||
}
|
||||
|
||||
$ds = 'openfiles';
|
||||
|
||||
$colour_area = 'F0E68C';
|
||||
$colour_line = 'FF4500';
|
||||
|
||||
$colour_area_max = 'FFEE99';
|
||||
|
||||
$graph_max = 1000000;
|
||||
|
||||
$unit_text = 'Open files';
|
||||
|
||||
require 'includes/html/graphs/generic_simplex.inc.php';
|
Reference in New Issue
Block a user