2016-01-24 03:43:59 +01:00
|
|
|
<?php
|
|
|
|
/*
|
2016-01-26 20:20:42 +10:00
|
|
|
* LibreNMS per-module poller performance
|
2016-01-24 03:43:59 +01:00
|
|
|
*
|
|
|
|
* Copyright (c) 2016 Mike Rostermund <mike@kollegienet.dk>
|
2016-01-26 20:20:42 +10:00
|
|
|
* Copyright (c) 2016 Paul D. Gear <paul@librenms.org>
|
|
|
|
*
|
2016-01-24 03:43:59 +01:00
|
|
|
* This program is free software: you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU General Public License as published by the
|
|
|
|
* Free Software Foundation, either version 3 of the License, or (at your
|
|
|
|
* option) any later version. Please see LICENSE.txt at the top level of
|
|
|
|
* the source code distribution for details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
$scale_min = '0';
|
|
|
|
$attribs = get_dev_attribs($device['device_id']);
|
2019-06-23 00:29:12 -05:00
|
|
|
$modules = \LibreNMS\Config::get('poller_modules');
|
|
|
|
ksort($modules);
|
2016-01-24 03:43:59 +01:00
|
|
|
|
2019-04-11 23:26:42 -05:00
|
|
|
require 'includes/html/graphs/common.inc.php';
|
2016-01-24 03:43:59 +01:00
|
|
|
|
2016-01-26 20:20:42 +10:00
|
|
|
$count = 0;
|
2019-06-23 00:29:12 -05:00
|
|
|
foreach ($modules as $module => $module_status) {
|
2016-01-26 20:20:42 +10:00
|
|
|
$rrd_filename = rrd_name($device['hostname'], array('poller-perf', $module));
|
2017-03-28 16:13:31 +01:00
|
|
|
if ($attribs['poll_'.$module] || ($module_status && !isset($attribs['poll_'.$module])) ||
|
2019-06-23 00:29:12 -05:00
|
|
|
(\LibreNMS\Config::getOsSetting($device['os'], 'poller_modules.' . $module) && !isset($attribs['poll_' . $module]))) {
|
2016-07-08 15:09:11 -05:00
|
|
|
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
2016-01-26 20:20:42 +10:00
|
|
|
$ds['ds'] = 'poller';
|
|
|
|
$ds['descr'] = $module;
|
|
|
|
$ds['filename'] = $rrd_filename;
|
|
|
|
$rrd_list[] = $ds;
|
|
|
|
$count++;
|
2016-01-24 03:43:59 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2016-01-26 20:20:42 +10:00
|
|
|
|
|
|
|
$unit_text = "Seconds";
|
|
|
|
$simple_rrd = false;
|
|
|
|
$nototal = false;
|
|
|
|
$text_orig = true;
|
|
|
|
$colours = 'manycolours';
|
2019-04-11 23:26:42 -05:00
|
|
|
require "includes/html/graphs/generic_multi_simplex_seperated.inc.php";
|