mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
feature: Add Squid application support (#6011)
This commit is contained in:
43
html/includes/graphs/application/squid_bytehit.inc.php
Normal file
43
html/includes/graphs/application/squid_bytehit.inc.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
$name = 'squid';
|
||||
$app_id = $app['app_id'];
|
||||
$scale_min = 0;
|
||||
$colours = 'mixed';
|
||||
$unit_text = 'byte hit ratio';
|
||||
$unitlen = 15;
|
||||
$bigdescrlen = 15;
|
||||
$smalldescrlen = 15;
|
||||
$dostack = 0;
|
||||
$printtotal = 0;
|
||||
$addarea = 1;
|
||||
$transparency = 15;
|
||||
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', $name, $app_id));
|
||||
|
||||
if (is_file($rrd_filename)) {
|
||||
$rrd_list = array(
|
||||
array(
|
||||
'filename' => $rrd_filename,
|
||||
'descr' => '1 minute',
|
||||
'ds' => 'reqbyteratio1',
|
||||
'colour' => '582a72'
|
||||
),
|
||||
array(
|
||||
'filename' => $rrd_filename,
|
||||
'descr' => '5 minute',
|
||||
'ds' => 'reqbyteratio5',
|
||||
'colour' => '28774f'
|
||||
),
|
||||
array(
|
||||
'filename' => $rrd_filename,
|
||||
'descr' => '60 minute',
|
||||
'ds' => 'reqbyteratio60',
|
||||
'colour' => '28536c'
|
||||
)
|
||||
);
|
||||
} else {
|
||||
echo "file missing: $rrd_filename";
|
||||
}
|
||||
|
||||
require 'includes/graphs/generic_v3_multiline.inc.php';
|
31
html/includes/graphs/application/squid_clients.inc.php
Normal file
31
html/includes/graphs/application/squid_clients.inc.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
$name = 'squid';
|
||||
$app_id = $app['app_id'];
|
||||
$scale_min = 0;
|
||||
$colours = 'mixed';
|
||||
$unit_text = 'clients';
|
||||
$unitlen = 10;
|
||||
$bigdescrlen = 15;
|
||||
$smalldescrlen = 15;
|
||||
$dostack = 0;
|
||||
$printtotal = 0;
|
||||
$addarea = 1;
|
||||
$transparency = 15;
|
||||
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', $name, $app_id));
|
||||
|
||||
if (is_file($rrd_filename)) {
|
||||
$rrd_list = array(
|
||||
array(
|
||||
'filename' => $rrd_filename,
|
||||
'descr' => 'clients',
|
||||
'ds' => 'clients',
|
||||
'colour' => '582a72'
|
||||
)
|
||||
);
|
||||
} else {
|
||||
echo "file missing: $rrd_filename";
|
||||
}
|
||||
|
||||
require 'includes/graphs/generic_v3_multiline.inc.php';
|
31
html/includes/graphs/application/squid_cputime.inc.php
Normal file
31
html/includes/graphs/application/squid_cputime.inc.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
$name = 'squid';
|
||||
$app_id = $app['app_id'];
|
||||
$scale_min = 0;
|
||||
$colours = 'mixed';
|
||||
$unit_text = 'seconds';
|
||||
$unitlen = 10;
|
||||
$bigdescrlen = 10;
|
||||
$smalldescrlen = 10;
|
||||
$dostack = 0;
|
||||
$printtotal = 0;
|
||||
$addarea = 1;
|
||||
$transparency = 15;
|
||||
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', $name, $app_id));
|
||||
|
||||
if (is_file($rrd_filename)) {
|
||||
$rrd_list = array(
|
||||
array(
|
||||
'filename' => $rrd_filename,
|
||||
'descr' => 'cpu time',
|
||||
'ds' => 'cputime',
|
||||
'colour' => '582a72'
|
||||
)
|
||||
);
|
||||
} else {
|
||||
echo "file missing: $rrd_filename";
|
||||
}
|
||||
|
||||
require 'includes/graphs/generic_v3_multiline.inc.php';
|
31
html/includes/graphs/application/squid_cpuusage.inc.php
Normal file
31
html/includes/graphs/application/squid_cpuusage.inc.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
$name = 'squid';
|
||||
$app_id = $app['app_id'];
|
||||
$scale_min = 0;
|
||||
$colours = 'mixed';
|
||||
$unit_text = 'cpu%';
|
||||
$unitlen = 10;
|
||||
$bigdescrlen = 15;
|
||||
$smalldescrlen = 15;
|
||||
$dostack = 0;
|
||||
$printtotal = 0;
|
||||
$addarea = 1;
|
||||
$transparency = 15;
|
||||
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', $name, $app_id));
|
||||
|
||||
if (is_file($rrd_filename)) {
|
||||
$rrd_list = array(
|
||||
array(
|
||||
'filename' => $rrd_filename,
|
||||
'descr' => 'cpu usage',
|
||||
'ds' => 'cpuusage',
|
||||
'colour' => '582a72'
|
||||
)
|
||||
);
|
||||
} else {
|
||||
echo "file missing: $rrd_filename";
|
||||
}
|
||||
|
||||
require 'includes/graphs/generic_v3_multiline.inc.php';
|
37
html/includes/graphs/application/squid_filedescr.inc.php
Normal file
37
html/includes/graphs/application/squid_filedescr.inc.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
$name = 'squid';
|
||||
$app_id = $app['app_id'];
|
||||
$scale_min = 0;
|
||||
$colours = 'mixed';
|
||||
$unit_text = 'file descr.';
|
||||
$unitlen = 11;
|
||||
$bigdescrlen = 11;
|
||||
$smalldescrlen = 11;
|
||||
$dostack = 0;
|
||||
$printtotal = 0;
|
||||
$addarea = 1;
|
||||
$transparency = 15;
|
||||
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', $name, $app_id));
|
||||
|
||||
if (is_file($rrd_filename)) {
|
||||
$rrd_list = array(
|
||||
array(
|
||||
'filename' => $rrd_filename,
|
||||
'descr' => 'in use',
|
||||
'ds' => 'curfiledescrcnt',
|
||||
'colour' => '28536c'
|
||||
),
|
||||
array(
|
||||
'filename' => $rrd_filename,
|
||||
'descr' => 'max',
|
||||
'ds' => 'curfiledescrmax',
|
||||
'colour' => 'd46a6a'
|
||||
)
|
||||
);
|
||||
} else {
|
||||
echo "file missing: $rrd_filename";
|
||||
}
|
||||
|
||||
require 'includes/graphs/generic_v3_multiline.inc.php';
|
43
html/includes/graphs/application/squid_http.inc.php
Normal file
43
html/includes/graphs/application/squid_http.inc.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
$name = 'squid';
|
||||
$app_id = $app['app_id'];
|
||||
$scale_min = 0;
|
||||
$colours = 'mixed';
|
||||
$unit_text = '';
|
||||
$unitlen = 10;
|
||||
$bigdescrlen = 15;
|
||||
$smalldescrlen = 15;
|
||||
$dostack = 0;
|
||||
$printtotal = 0;
|
||||
$addarea = 1;
|
||||
$transparency = 15;
|
||||
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', $name, $app_id));
|
||||
|
||||
if (is_file($rrd_filename)) {
|
||||
$rrd_list = array(
|
||||
array(
|
||||
'filename' => $rrd_filename,
|
||||
'descr' => 'requests',
|
||||
'ds' => 'protoclienthttpreq',
|
||||
'colour' => '582a72'
|
||||
),
|
||||
array(
|
||||
'filename' => $rrd_filename,
|
||||
'descr' => 'hits',
|
||||
'ds' => 'httphits',
|
||||
'colour' => '28774f'
|
||||
),
|
||||
array(
|
||||
'filename' => $rrd_filename,
|
||||
'descr' => 'errs to clnt',
|
||||
'ds' => 'httperrors',
|
||||
'colour' => '28536c'
|
||||
)
|
||||
);
|
||||
} else {
|
||||
echo "file missing: $rrd_filename";
|
||||
}
|
||||
|
||||
require 'includes/graphs/generic_v3_multiline.inc.php';
|
37
html/includes/graphs/application/squid_httpbw.inc.php
Normal file
37
html/includes/graphs/application/squid_httpbw.inc.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
$name = 'squid';
|
||||
$app_id = $app['app_id'];
|
||||
$scale_min = 0;
|
||||
$colours = 'mixed';
|
||||
$unit_text = 'kB/s';
|
||||
$unitlen = 10;
|
||||
$bigdescrlen = 10;
|
||||
$smalldescrlen = 10;
|
||||
$dostack = 0;
|
||||
$printtotal = 0;
|
||||
$addarea = 1;
|
||||
$transparency = 15;
|
||||
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', $name, $app_id));
|
||||
|
||||
if (is_file($rrd_filename)) {
|
||||
$rrd_list = array(
|
||||
array(
|
||||
'filename' => $rrd_filename,
|
||||
'descr' => 'HTTP in',
|
||||
'ds' => 'httpinkb',
|
||||
'colour' => 'd46a6a'
|
||||
),
|
||||
array(
|
||||
'filename' => $rrd_filename,
|
||||
'descr' => 'HTTP out',
|
||||
'ds' => 'httpoutkb',
|
||||
'colour' => '28774f'
|
||||
)
|
||||
);
|
||||
} else {
|
||||
echo "file missing: $rrd_filename";
|
||||
}
|
||||
|
||||
require 'includes/graphs/generic_v3_multiline.inc.php';
|
61
html/includes/graphs/application/squid_memory.inc.php
Normal file
61
html/includes/graphs/application/squid_memory.inc.php
Normal file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
$name = 'squid';
|
||||
$app_id = $app['app_id'];
|
||||
$scale_min = 0;
|
||||
$colours = 'mixed';
|
||||
$unit_text = 'kilobytes';
|
||||
$unitlen = 10;
|
||||
$bigdescrlen = 15;
|
||||
$smalldescrlen = 15;
|
||||
$dostack = 0;
|
||||
$printtotal = 0;
|
||||
$addarea = 1;
|
||||
$transparency = 15;
|
||||
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', $name, $app_id));
|
||||
|
||||
if (is_file($rrd_filename)) {
|
||||
$rrd_list = array(
|
||||
array(
|
||||
'filename' => $rrd_filename,
|
||||
'descr' => 'max mem',
|
||||
'ds' => 'memmaxsize',
|
||||
'colour' => '582a72'
|
||||
),
|
||||
array(
|
||||
'filename' => $rrd_filename,
|
||||
'descr' => 'max swap',
|
||||
'ds' => 'swapmaxsize',
|
||||
'colour' => '28774f'
|
||||
),
|
||||
array(
|
||||
'filename' => $rrd_filename,
|
||||
'descr' => 'high swap WM',
|
||||
'ds' => 'swaphighwm',
|
||||
'colour' => '28536c'
|
||||
),
|
||||
array(
|
||||
'filename' => $rrd_filename,
|
||||
'descr' => 'low swap WM',
|
||||
'ds' => 'swaplowwm',
|
||||
'colour' => 'd46a6a'
|
||||
),
|
||||
array(
|
||||
'filename' => $rrd_filename,
|
||||
'descr' => 'swap usage',
|
||||
'ds' => 'currentswapsize',
|
||||
'colour' => 'ff11bb'
|
||||
),
|
||||
array(
|
||||
'filename' => $rrd_filename,
|
||||
'descr' => 'memory usage',
|
||||
'ds' => 'memusage',
|
||||
'colour' => 'd853dc'
|
||||
)
|
||||
);
|
||||
} else {
|
||||
echo "file missing: $rrd_filename";
|
||||
}
|
||||
|
||||
require 'includes/graphs/generic_v3_multiline.inc.php';
|
31
html/includes/graphs/application/squid_objcount.inc.php
Normal file
31
html/includes/graphs/application/squid_objcount.inc.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
$name = 'squid';
|
||||
$app_id = $app['app_id'];
|
||||
$scale_min = 0;
|
||||
$colours = 'mixed';
|
||||
$unit_text = 'objects';
|
||||
$unitlen = 10;
|
||||
$bigdescrlen = 15;
|
||||
$smalldescrlen = 15;
|
||||
$dostack = 0;
|
||||
$printtotal = 0;
|
||||
$addarea = 1;
|
||||
$transparency = 15;
|
||||
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', $name, $app_id));
|
||||
|
||||
if (is_file($rrd_filename)) {
|
||||
$rrd_list = array(
|
||||
array(
|
||||
'filename' => $rrd_filename,
|
||||
'descr' => 'stored',
|
||||
'ds' => 'numobjcount',
|
||||
'colour' => '582a72'
|
||||
)
|
||||
);
|
||||
} else {
|
||||
echo "file missing: $rrd_filename";
|
||||
}
|
||||
|
||||
require 'includes/graphs/generic_v3_multiline.inc.php';
|
31
html/includes/graphs/application/squid_pagefaults.inc.php
Normal file
31
html/includes/graphs/application/squid_pagefaults.inc.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
$name = 'squid';
|
||||
$app_id = $app['app_id'];
|
||||
$scale_min = 0;
|
||||
$colours = 'mixed';
|
||||
$unit_text = 'per second';
|
||||
$unitlen = 10;
|
||||
$bigdescrlen = 15;
|
||||
$smalldescrlen = 15;
|
||||
$dostack = 0;
|
||||
$printtotal = 0;
|
||||
$addarea = 1;
|
||||
$transparency = 15;
|
||||
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', $name, $app_id));
|
||||
|
||||
if (is_file($rrd_filename)) {
|
||||
$rrd_list = array(
|
||||
array(
|
||||
'filename' => $rrd_filename,
|
||||
'descr' => 'page faults',
|
||||
'ds' => 'syspagefaults',
|
||||
'colour' => '582a72'
|
||||
)
|
||||
);
|
||||
} else {
|
||||
echo "file missing: $rrd_filename";
|
||||
}
|
||||
|
||||
require 'includes/graphs/generic_v3_multiline.inc.php';
|
43
html/includes/graphs/application/squid_reqhit.inc.php
Normal file
43
html/includes/graphs/application/squid_reqhit.inc.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
$name = 'squid';
|
||||
$app_id = $app['app_id'];
|
||||
$scale_min = 0;
|
||||
$colours = 'mixed';
|
||||
$unit_text = 'hit ratio';
|
||||
$unitlen = 9;
|
||||
$bigdescrlen = 9;
|
||||
$smalldescrlen = 9;
|
||||
$dostack = 0;
|
||||
$printtotal = 0;
|
||||
$addarea = 1;
|
||||
$transparency = 15;
|
||||
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', $name, $app_id));
|
||||
|
||||
if (is_file($rrd_filename)) {
|
||||
$rrd_list = array(
|
||||
array(
|
||||
'filename' => $rrd_filename,
|
||||
'descr' => '1 minute',
|
||||
'ds' => 'reqhitratio1',
|
||||
'colour' => '582a72'
|
||||
),
|
||||
array(
|
||||
'filename' => $rrd_filename,
|
||||
'descr' => '5 minute',
|
||||
'ds' => 'reqhitratio5',
|
||||
'colour' => '28774f'
|
||||
),
|
||||
array(
|
||||
'filename' => $rrd_filename,
|
||||
'descr' => '60 minute',
|
||||
'ds' => 'reqhitratio60',
|
||||
'colour' => '28536c'
|
||||
)
|
||||
);
|
||||
} else {
|
||||
echo "file missing: $rrd_filename";
|
||||
}
|
||||
|
||||
require 'includes/graphs/generic_v3_multiline.inc.php';
|
37
html/includes/graphs/application/squid_server.inc.php
Normal file
37
html/includes/graphs/application/squid_server.inc.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
$name = 'squid';
|
||||
$app_id = $app['app_id'];
|
||||
$scale_min = 0;
|
||||
$colours = 'mixed';
|
||||
$unit_text = 'per second';
|
||||
$unitlen = 10;
|
||||
$bigdescrlen = 15;
|
||||
$smalldescrlen = 15;
|
||||
$dostack = 0;
|
||||
$printtotal = 0;
|
||||
$addarea = 1;
|
||||
$transparency = 15;
|
||||
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', $name, $app_id));
|
||||
|
||||
if (is_file($rrd_filename)) {
|
||||
$rrd_list = array(
|
||||
array(
|
||||
'filename' => $rrd_filename,
|
||||
'descr' => 'requests',
|
||||
'ds' => 'serverrequests',
|
||||
'colour' => '582a72'
|
||||
),
|
||||
array(
|
||||
'filename' => $rrd_filename,
|
||||
'descr' => 'hits',
|
||||
'ds' => 'servererrors',
|
||||
'colour' => '28774f'
|
||||
)
|
||||
);
|
||||
} else {
|
||||
echo "file missing: $rrd_filename";
|
||||
}
|
||||
|
||||
require 'includes/graphs/generic_v3_multiline.inc.php';
|
37
html/includes/graphs/application/squid_serverbw.inc.php
Normal file
37
html/includes/graphs/application/squid_serverbw.inc.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
$name = 'squid';
|
||||
$app_id = $app['app_id'];
|
||||
$scale_min = 0;
|
||||
$colours = 'mixed';
|
||||
$unit_text = 'kB/s';
|
||||
$unitlen = 10;
|
||||
$bigdescrlen = 15;
|
||||
$smalldescrlen = 15;
|
||||
$dostack = 0;
|
||||
$printtotal = 0;
|
||||
$addarea = 1;
|
||||
$transparency = 15;
|
||||
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', $name, $app_id));
|
||||
|
||||
if (is_file($rrd_filename)) {
|
||||
$rrd_list = array(
|
||||
array(
|
||||
'filename' => $rrd_filename,
|
||||
'descr' => 'server in',
|
||||
'ds' => 'serverinkb',
|
||||
'colour' => 'd46a6a'
|
||||
),
|
||||
array(
|
||||
'filename' => $rrd_filename,
|
||||
'descr' => 'server out',
|
||||
'ds' => 'serveroutkb',
|
||||
'colour' => '28774f'
|
||||
)
|
||||
);
|
||||
} else {
|
||||
echo "file missing: $rrd_filename";
|
||||
}
|
||||
|
||||
require 'includes/graphs/generic_v3_multiline.inc.php';
|
31
html/includes/graphs/application/squid_sysnumread.inc.php
Normal file
31
html/includes/graphs/application/squid_sysnumread.inc.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
$name = 'squid';
|
||||
$app_id = $app['app_id'];
|
||||
$scale_min = 0;
|
||||
$colours = 'mixed';
|
||||
$unit_text = 'per second';
|
||||
$unitlen = 10;
|
||||
$bigdescrlen = 15;
|
||||
$smalldescrlen = 15;
|
||||
$dostack = 0;
|
||||
$printtotal = 0;
|
||||
$addarea = 1;
|
||||
$transparency = 15;
|
||||
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', $name, $app_id));
|
||||
|
||||
if (is_file($rrd_filename)) {
|
||||
$rrd_list = array(
|
||||
array(
|
||||
'filename' => $rrd_filename,
|
||||
'descr' => 'http io reads',
|
||||
'ds' => 'sysnumreads',
|
||||
'colour' => '582a72'
|
||||
)
|
||||
);
|
||||
} else {
|
||||
echo "file missing: $rrd_filename";
|
||||
}
|
||||
|
||||
require 'includes/graphs/generic_v3_multiline.inc.php';
|
Reference in New Issue
Block a user