mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
sensors auth file for graphs (no real auth yet)
git-svn-id: http://www.observium.org/svn/observer/trunk@1535 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
8
html/includes/graphs/sensor/auth.inc.php
Normal file
8
html/includes/graphs/sensor/auth.inc.php
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
$sensor = mysql_fetch_array(mysql_query("SELECT * FROM sensors WHERE sensor_id = '".mres($_GET['id'])."'"));
|
||||
$device = device_by_id_cache($sensor['device_id']);
|
||||
|
||||
## FIXME WE ACTUALLY NEED TO AUTH, OK?
|
||||
|
||||
?>
|
@ -34,8 +34,10 @@ if ($device['os'] == "ios" || $device['os_group'] == "ios")
|
||||
{
|
||||
$entPhysicalIndex = $index;
|
||||
$descr = snmp_get($device, "entPhysicalName.".$index, "-Oqv", "ENTITY-MIB");
|
||||
if(!$descr) { snmp_get($device, "entPhysicalDescr.".$index, "-Oqv", "ENTITY-MIB"); }
|
||||
if(is_numeric($entry['entSensorMeasuredEntity']) && $entry['entSensorMeasuredEntity']) {
|
||||
$measured_descr = snmp_get($device, "entPhysicalName.".$entry['entSensorMeasuredEntity'],"-Oqv", "ENTITY-MIB");
|
||||
if(!measured_descr) { $measured_descr = snmp_get($device, "entPhysicalDescr.".$entry['entSensorMeasuredEntity'],"-Oqv", "ENTITY-MIB");}
|
||||
$descr = $measured_descr . " - " . $descr;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user