mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
additions to unix-agent. addition of basic munin-plugin support.
git-svn-id: http://www.observium.org/svn/observer/trunk@3088 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
23
html/includes/graphs/munin/auth.inc.php
Executable file
23
html/includes/graphs/munin/auth.inc.php
Executable file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
if (is_numeric($id))
|
||||
{
|
||||
$mplug = dbFetchRow("SELECT * FROM `munin_plugins` WHERE `mplug_id` = ?", array($id));
|
||||
|
||||
if (is_numeric($mplug['device_id']) && ($config['allow_unauth_graphs'] || device_permitted($mplug['device_id'])))
|
||||
{
|
||||
$device = device_by_id_cache($mplug['device_id']);
|
||||
$title = generate_device_link($device);
|
||||
# if(!empty($mplug['mplug_instance']))
|
||||
# {
|
||||
# $plugfile = $config['rrd_dir']."/".$device['hostname']."/munin/".$mplug['mplug_type']."_".$mplug['mplug_instance'];
|
||||
# $title .= " :: Plugin :: " . $mplug['mplug_type'] . " :: " . $mplug['mplug_title'];
|
||||
# } else {
|
||||
$plugfile = $config['rrd_dir']."/".$device['hostname']."/munin/".$mplug['mplug_type'];
|
||||
$title .= " :: Plugin :: " . $mplug['mplug_type'] . " - " . $mplug['mplug_title'];
|
||||
# }
|
||||
$auth = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
Reference in New Issue
Block a user