mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
some sensor unification, rename sensor rrds and rename the DS, add testing IPMI support (no web-part yet) - tested against Intel RMM3 and working. some further cleanups as well.
git-svn-id: http://www.observium.org/svn/observer/trunk@1758 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
+14
-1
@@ -76,6 +76,19 @@ function write_dev_attrib($device_id, $attrib_type, $attrib_value)
|
||||
return mysql_affected_rows();
|
||||
}
|
||||
|
||||
function get_dev_attrib($device, $attrib_type)
|
||||
{
|
||||
$sql = "SELECT attrib_value FROM devices_attribs WHERE `device_id` = '" . $device['device_id'] . "' AND `attrib_type` = '$attrib_type'";
|
||||
if ($row = mysql_fetch_assoc(mysql_query($sql)))
|
||||
{
|
||||
return $row['attrib_value'];
|
||||
}
|
||||
else
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
function shorthost($hostname, $len=16)
|
||||
{
|
||||
$parts = explode(".", $hostname);
|
||||
@@ -679,7 +692,7 @@ function isHexString($str)
|
||||
}
|
||||
|
||||
# Include all .inc.php files in $dir
|
||||
function include_dir($dir, $regex)
|
||||
function include_dir($dir, $regex = "")
|
||||
{
|
||||
global $device, $config;
|
||||
if ( $regex == "")
|
||||
|
||||
Reference in New Issue
Block a user