Files
librenms-librenms/includes/html/graphs/application/docker-common.inc.php
Lucas Dousse 49868ee1a6 docker stats app (#12358)
* docker stat app support

* Add missing doc and app

* stylci

* styleci

* styleci

* Add test data

* add snmpsim

* Update docker.inc.php

test with use Number::Bi

* typo

* Add tests

* Add tests

Co-authored-by: Jellyfrog <Jellyfrog@users.noreply.github.com>
2021-03-07 20:26:44 +01:00

37 lines
838 B
PHP

<?php
$name = 'docker';
$app_id = $app['app_id'];
$colours = 'mega';
$dostack = 0;
$printtotal = 0;
$addarea = 1;
$transparency = 15;
$unitlen = 20;
$bigdescrlen = 25;
$smalldescrlen = 25;
if (isset($vars['container'])) {
$containers = [$vars['container']];
} else {
$containers = get_arrays_with_application($device, $app['app_id'], 'docker');
}
$int = 0;
while (isset($containers[$int])) {
$container_name = $containers[$int];
$rrd_filename = rrd_name($device['hostname'], ['app', $name, $app_id, $container_name]);
if (rrdtool_check_rrd_exists($rrd_filename)) {
$rrd_list[] = [
'filename' => $rrd_filename,
'descr' => $container_name,
'ds' => $rrdVar,
];
}
$int++;
}
require 'includes/html/graphs/generic_multi_line_exact_numbers.inc.php';