Files
librenms-librenms/html/includes/graphs/munin/auth.inc.php
Tony Murray 57650e4ffc Remove nfs requirement for distributed poller (with rrdtool 1.5+)
Use data_update instead of rrd_update/rrd_create and influx_update
Centralize rrd file check so we can check against a remote rrdcached server too
Use rrd_name() to generate rrd file names
2016-07-07 21:10:06 -05:00

16 lines
676 B
PHP

<?php
if (is_numeric($vars['plugin'])) {
$mplug = dbFetchRow('SELECT * FROM `munin_plugins` AS M, `devices` AS D WHERE `mplug_id` = ? AND D.device_id = M.device_id ', array($vars['plugin']));
}
else {
$mplug = dbFetchRow('SELECT * FROM `munin_plugins` AS M, `devices` AS D WHERE M.`device_id` = ? AND `mplug_type` = ? AND D.device_id = M.device_id', array($device['device_id'], $vars['plugin']));
}
if (is_numeric($mplug['device_id']) && ($auth || device_permitted($mplug['device_id']))) {
$device = &$mplug;
$title = generate_device_link($device);
$title .= ' :: Plugin :: '.$mplug['mplug_type'].' - '.$mplug['mplug_title'];
$auth = true;
}