Files
librenms-librenms/includes/html/graphs/application/mojo_cape_submit-subs_top12.inc.php
Zane C. Bowers-Hadley 54a38dd4cd add the Mojo CAPE Submit app (#15140)
* add poller for mojo cape submit

* mojo_cape_submit poller now works

* add app page for mojo_cape_submit

* add basic generic stat graphs for mojo cape submit

* general size stats graph for mojo_cape_submit

* make sure we update slugs that did not see anything submitted for them

* sort the slugs by sub count

* add app protos graph and sub top 12 graphs

* add mojo cape submit docs

* add tests for mojo_cape_submit

* add mojo_cape_submit to the apps page

* add string helper for mojo_cape_submit

* poke lots of stuff with php-cs-fixer

* remove a unneeded line

* add a missing metric and app data to test
2023-07-19 22:41:51 -05:00

32 lines
711 B
PHP

<?php
$name = 'mojo_cape_submit';
$app_id = $app['app_id'];
$unit_text = 'Bytes';
$colours = 'rainbow';
$dostack = 0;
$printtotal = 1;
$addarea = 0;
$transparency = 0;
$float_precision = 3;
$slugs_all = $app->data['slugs'] ?? [];
$slugs = array_slice(array_keys($slugs_all), 0, 12);
$rrd_list = [];
foreach ($slugs as $index => $slug) {
$rrd_filename = Rrd::name($device['hostname'], ['app', $name, $app->app_id, 'slugs___-___' . $slug]);
$rrd_list[] = [
'filename' => $rrd_filename,
'descr' => $slug,
'ds' => 'sub_count',
];
}
if (count($rrd_list)) {
d_echo('No relevant log file RRDs found');
}
require 'includes/html/graphs/generic_multi_line.inc.php';