add infrastructure to collect status of cisco catalyst 6k crossbar and new state table for entity-mib

git-svn-id: http://www.observium.org/svn/observer/trunk@2723 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2011-11-14 18:28:00 +00:00
parent 69e0b770cc
commit 45c6d95501
13 changed files with 2875 additions and 27 deletions

View File

@@ -394,6 +394,17 @@ function get_dev_attribs($device)
return $attribs;
}
function get_dev_entity_state($device)
{
$state = array();
foreach (dbFetchRows("SELECT * FROM entPhysical_state WHERE `device_id` = ?", array($device)) as $entity)
{
$state['group'][$entity['group']][$entity['entPhysicalIndex']][$entity['subindex']][$entity['key']] = $entity['value'];
$state['index'][$entity['entPhysicalIndex']][$entity['subindex']][$entity['group']][$entity['key']] = $entity['value'];
}
return $state;
}
function get_dev_attrib($device, $attrib_type)
{
if ($row = dbFetchRow("SELECT attrib_value FROM devices_attribs WHERE `device_id` = ? AND `attrib_type` = ?", array($device['device_id'], $attrib_type)))