new files

git-svn-id: http://www.observium.org/svn/observer/trunk@410 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2009-04-28 11:02:13 +00:00
parent 1df7127d28
commit 8fc09e963f
3 changed files with 126 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
<?php
echo("Physical Inventory : ");
# if($config['enable_inventory']) {
$ents_cmd = $config['snmpwalk'] . " -m HOST-RESOURCES-MIB -O qn -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'].":".$device['$port'] . " ";
$ents_cmd .= "hrDeviceIndex | sed s/.1.3.6.1.2.1.25.3.2.1.1.//g | cut -f 1 -d\" \"";
$ents = trim(`$ents_cmd | grep -v o`);
foreach(explode("\n", $ents) as $hrDeviceIndex) {
$ent_data = $config['snmpget'] ". -m HOST-RESOURCES-MIB:ENTITY-MIB -Ovqs -";
$ent_data .= $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'] .":".$device['port'];
$ent_data .= " hrDeviceType." . $entPhysicalIndex;
$ent_data .= " hrDeviceDescr." . $entPhysicalIndex;
$ent_data .= " entPhysicalParentRelPos." . $entPhysicalIndex;
$ent_data .= " entAliasMappingIdentifier." . $entPhysicalIndex. ".0";
}
#}
?>