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:
Tom Laermans
2010-12-15 17:54:42 +00:00
parent 500ed09299
commit 06d2a707d5
25 changed files with 293 additions and 182 deletions
+14 -1
View File
@@ -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 == "")