本文整理汇总了PHP中my_snmp_get函数的典型用法代码示例。如果您正苦于以下问题:PHP my_snmp_get函数的具体用法?PHP my_snmp_get怎么用?PHP my_snmp_get使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了my_snmp_get函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: function
* @author Mark Unwin <marku@opmantek.com>
*
* @version 1.12.8
* @copyright Copyright (c) 2014, Opmantek
* @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3
*/
# Vendor Scientific-Atlanta, Inc.
$get_oid_details = function ($ip, $credentials, $oid) {
$details = new stdClass();
if ($oid == '1.3.6.1.4.1.1429.2.2.6.2') {
$details->model = 'D98xx Program Receiver';
$details->type = 'satellite receiver';
$details->serial = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.1429.2.2.4.1.7.0");
}
# attempt to refine the model number
$temp_model = '';
$temp_model = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.1429.2.2.4.1.6.0");
if (!empty($temp_model)) {
$temp_array = explode('_', $temp_model);
if ($temp_array[0] != '') {
$details->model = $temp_array[0] . ' Program Receiver';
}
}
unset($temp_model);
unset($tmp_array);
if ($oid == '1.3.6.1.4.1.1429.2.1.6.1.0.2.0.1') {
$details->model = 'WebSTAR DPC2100 Series';
$details->type = 'cable modem';
}
return $details;
};
示例2: function
#
# For further information on Open-AudIT or for a license other than AGPL please see
# www.opmantek.com or email contact@opmantek.com
#
# *****************************************************************************
/*
* @package Open-AudIT
* @author Mark Unwin <marku@opmantek.com>
*
* @version 1.12.8
* @copyright Copyright (c) 2014, Opmantek
* @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3
*/
# Vendor NetApp
$get_oid_details = function ($ip, $credentials, $oid) {
$details = new stdClass();
if ($oid == '1.3.6.1.4.1.789.2.1') {
$details->model = 'Filer';
$details->type = 'nas';
}
if ($oid == '1.3.6.1.4.1.789.2.2') {
$details->model = 'Net Cache';
$details->type = 'web cache';
}
if ($oid == '1.3.6.1.4.1.789.2.3') {
$details->model = 'Clustered Filer';
$details->type = 'nas';
}
$details->serial = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.4874.2.2.2.1.3.4.1.9.0");
return $details;
};
示例3: my_snmp_get
}
if ($oid == '1.3.6.1.4.1.25053.3.1.3.2') {
$details->model = 'Wireless Metro MM2211';
}
if ($oid == '1.3.6.1.4.1.25053.3.1.3.3') {
$details->model = 'Wireless Metro MM2221';
}
if ($oid == '1.3.6.1.4.1.25053.3.1.4') {
$details->model = 'Wireless Hotzone';
}
if ($oid == '1.3.6.1.4.1.25053.3.1.4.1') {
$details->model = 'Wireless Hotzone ZF2925';
}
if ($oid == '1.3.6.1.4.1.25053.3.1.4.2') {
$details->model = 'Wireless Hotzone ZF2942';
}
if ($oid == '1.3.6.1.4.1.25053.3.1.4.3') {
$details->model = 'Wireless Hotzone ZF7942';
}
if ($oid == '1.3.6.1.4.1.25053.3.1.4.4') {
$details->model = 'Wireless Hotzone ZF7962';
}
if ($oid == '1.3.6.1.4.1.25053.3.1.4.5') {
$details->model = 'Wireless Hotzone ZF2741';
}
$details->serial = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.25053.1.1.2.1.1.1.2.0");
if (empty($details->model)) {
$details->model = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.25053.1.1.2.1.1.1.1.0");
}
return $details;
};
示例4: my_snmp_get
$details->model = 'Security Blade IMLB';
$details->type = 'network device';
}
if ($oid == '1.3.6.1.4.1.25506.11.4.4') {
$details->model = 'Security Blade LSQ1FWBSC0';
$details->type = 'network device';
}
if ($oid == '1.3.6.1.4.1.25506.11.4.5') {
$details->model = 'Security Blade LSQM1LBC0';
$details->type = 'network device';
}
if ($oid == '1.3.6.1.4.1.25506.11.4.6') {
$details->model = 'Security Blade LSQ1NSMSC0';
$details->type = 'network device';
}
if ($oid == '1.3.6.1.4.1.25506.11.4.7') {
$details->model = 'Security Blade LSR1FW2A1';
$details->type = 'network device';
}
if ($oid == '1.3.6.1.4.1.25506.11.4.8') {
$details->model = 'Security Blade LSR1LB1A1';
$details->type = 'network device';
}
if ($oid == '1.3.6.1.4.1.25506.11.4.9') {
$details->model = 'Security Blade LSR1NSM1A1';
$details->type = 'network device';
}
# serial
$details->serial = my_snmp_get($ip, $credentials, "1.3.6.1.2.1.47.1.1.1.1.11.1");
return $details;
};
示例5: foreach
if (is_array($guest_name) and count($guest_name) > 0) {
$details->class = 'hypervisor';
foreach ($guest_name as $key => $value) {
$guest = new stdClass();
$guest->vm_id = str_replace('.1.3.6.1.4.1.6876.2.1.1.2.', '', $key);
$guest->net = array();
$guest_mac = my_snmp_real_walk($ip, $credentials, "1.3.6.1.4.1.6876.2.4.1.7." . $guest->vm_id);
if (isset($guest_mac) and is_array($guest_mac) and count($guest_mac) > 0) {
if (!empty($guest_mac[0])) {
foreach ($guest_mac[0] as $k => $v) {
if ($v != '') {
$mk = str_replace(".1.3.6.1.4.1.6876.2.4.1.7." . $guest['id'] . '.', '', $k);
$guest->net[$mk]['mac'] = snmp_clean($v);
$guest->net[$mk]['mac'] = strtolower(str_replace(" ", ":", $guest['net'][$mk]['mac']));
$guest->net[$mk]['desc'] = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.6876.2.4.1.4." . $guest->vm_id . "." . $mk);
}
}
}
}
$guest->uuid = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.6876.2.1.1.10." . $guest->vm_id);
$guest->memory = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.6876.2.1.1.5." . $guest->vm_id);
$guest->cpu = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.6876.2.1.1.9." . $guest->vm_id);
$guest->status = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.6876.2.1.1.6." . $guest->vm_id);
$guest->config_file = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.6876.2.1.1.3." . $guest->vm_id);
$guest->vm_group = '';
$guests[] = $guest;
unset($guest);
unset($guest_mac);
}
}
unset($guest_name);
示例6: function
# www.opmantek.com or email contact@opmantek.com
#
# *****************************************************************************
/*
* @package Open-AudIT
* @author Mark Unwin <marku@opmantek.com>
*
* @version 1.12.8
* @copyright Copyright (c) 2014, Opmantek
* @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3
*/
# Vendor Riverbed
$get_oid_details = function ($ip, $credentials, $oid) {
$details = new stdClass();
# http://www.circitor.fr/Mibs/Html/STEELHEAD-MIB.php
#if ($oid == '1.3.6.1.4.1.17163.1.1') { $details->model = 'Riverbed Steelhead XX20'; $details->type = 'wan accelerator'; }
#if ($oid == '1.3.6.1.4.1.17163.1.2') { $details->model = 'Riverbed Steelhead CMC8000'; $details->type = 'wan accelerator'; }
#if ($oid == '1.3.6.1.4.1.17163.1.3') { $details->model = 'Riverbed Steelhead IC9200'; $details->type = 'wan accelerator'; }
$details->type = 'wan accelerator';
# model
$details->model = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.17163.1.1.1.1.0");
if (empty($details->model)) {
$details->model = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.17163.1.51.1.1.0");
}
# serial
$details->serial = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.17163.1.1.1.2.0");
if (empty($details->serial)) {
$details->serial = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.17163.1.51.1.2.0");
}
return $details;
};
示例7: my_snmp_get
if ($oid == '1.3.6.1.4.1.207.1.4.78') {
$details->model = 'AT 8024M';
$details->type = 'switch';
}
if ($oid == '1.3.6.1.4.1.207.1.4.80') {
$details->model = 'AT 8O26FC';
$details->type = 'unknown';
}
if ($oid == '1.3.6.1.4.1.207.1.4.86') {
$details->model = 'AT 8012M';
$details->type = 'unknown';
}
if ($oid == '1.3.6.1.4.1.207.1.4.89') {
$details->model = 'AT 8026T';
$details->type = 'switch';
}
if ($oid == '1.3.6.1.4.1.207.1.4.9') {
$details->model = 'AT 8200';
$details->type = 'switch';
}
if ($oid == '1.3.6.1.4.1.207.1.4.98') {
$details->model = 'AT 8524M';
$details->type = 'switch';
}
if ($oid == '1.3.6.1.4.1.207.1.4.99') {
$details->model = 'AT 8550GB';
$details->type = 'switch';
}
$details->serial = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.207.8.4.4.5.2.1.5");
return $details;
};
示例8: my_snmp_get
$details->type = 'switch';
}
if ($oid == '1.3.6.1.4.1.11863.1.1.6') {
$details->model = 'TL-SL3428un';
$details->type = 'switch';
}
if ($oid == '1.3.6.1.4.1.11863.1.1.7') {
$details->model = 'TL-SG5428';
$details->type = 'switch';
}
if ($oid == '1.3.6.1.4.1.11863.1.1.13') {
$details->model = 'TL-SG2424';
$details->type = 'switch';
}
if ($oid == '1.3.6.1.4.1.11863.1.1.59') {
$details->model = 'TL-SL5428';
$details->type = 'switch';
}
if ($oid == '1.3.6.1.4.1.11863.100.101') {
$details->model = 'TL-SL3428';
$details->type = 'switch';
}
if ($oid == '1.3.6.1.4.1.11863.100.102') {
$details->model = 'TL-SL3452';
$details->type = 'switch';
}
if (empty($details->model)) {
$details->model = my_snmp_get($ip, $credentials, "1.3.6.1.2.1.16.19.3.0");
}
return $details;
};
示例9: function
#
# *****************************************************************************
/*
* @package Open-AudIT
* @author Mark Unwin <marku@opmantek.com>
*
* @version 1.12.8
* @copyright Copyright (c) 2014, Opmantek
* @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3
*/
# Vendor Frogfoot Networks
$get_oid_details = function ($ip, $credentials, $oid) {
$details = new stdClass();
$details = new stdClass();
# manufacturer
$details->manufacturer = my_snmp_get($ip, $credentials, "1.2.840.10036.3.1.2.1.2.5");
$details->os_name = my_snmp_get($ip, $credentials, "1.2.840.10036.3.1.2.1.4.5");
# serial
$details->serial = my_snmp_get($ip, $credentials, "1.2.840.10036.1.1.1.1.5");
# model
$details->model = my_snmp_get($ip, $credentials, "1.2.840.10036.3.1.2.1.3.5");
# maybe we have a Ubiquiti device
if (stripos($details->manufacturer, 'ubiquiti') !== false) {
$details->type = 'wap';
$details->icon = 'wap';
$details->os_group = 'Linux';
$details->os_family = 'Ubiquiti AirOS';
$details->os_name = 'Ubiquiti AirOS version ' . $temp_os_name;
}
return $details;
};
示例10: my_snmp_get
}
if ($oid == '1.3.6.1.4.1.890.1.6.9') {
$details->model = 'zywall100';
$details->type = 'unknown';
}
if ($oid == '1.3.6.1.4.1.890.1.7') {
$details->model = 'atmEncryptor';
$details->type = 'unknown';
}
if ($oid == '1.3.6.1.4.1.890.1.8') {
$details->model = 'serviceGateway';
$details->type = 'unknown';
}
if ($oid == '1.3.6.1.4.1.890.1.8.1') {
$details->model = 'serviceGWCommon';
$details->type = 'unknown';
}
if ($oid == '1.3.6.1.4.1.890.1.8.2') {
$details->model = 'vsg1000';
$details->type = 'unknown';
}
if ($oid == '1.3.6.1.4.1.890.1.8.3') {
$details->model = 'vsg1200';
$details->type = 'unknown';
}
if ($details->type = '' or $details->type == 'unknown') {
$details->type == 'unknown';
$details->type = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.890.1.2.11.1.1.1.0");
}
return $details;
};
示例11: function
# *****************************************************************************
/*
* @package Open-AudIT
* @author Mark Unwin <marku@opmantek.com>
*
* @version 1.12.8
* @copyright Copyright (c) 2014, Opmantek
* @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3
*/
# Vendor Alcatel
# NOTE - this is VERY much guesswork.
# http://www.zhone.com/support/manuals/docs/AZ/SNMP-A2-GB20-00.pdf
$get_oid_details = function ($ip, $credentials, $oid) {
$details = new stdClass();
$details->manufacturer = 'Alcatel';
$i = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.8059.1.1.2.1.1.1.1");
if ($i == '1') {
$details->model = '12000';
$details->type = 'dslam';
}
if ($i == '2') {
$details->model = '4000';
$details->type = 'dslam';
}
if ($i == '3') {
$details->model = 'Mini DSLAM';
$details->type = 'dslam';
}
if ($i == '4') {
$details->model = 'Micro DSLAM';
$details->type = 'dslam';
示例12: function
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with Open-AudIT (most likely in a file named LICENSE).
# If not, see <http://www.gnu.org/licenses/>
#
# For further information on Open-AudIT or for a license other than AGPL please see
# www.opmantek.com or email contact@opmantek.com
#
# *****************************************************************************
/*
* @package Open-AudIT
* @author Mark Unwin <marku@opmantek.com>
*
* @version 1.12.8
* @copyright Copyright (c) 2014, Opmantek
* @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3
*/
# Vendor Ricoh
$get_oid_details = function ($ip, $credentials, $oid) {
$details = new stdClass();
$details->serial = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.367.3.2.1.2.1.4.0");
$details->hostname = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.367.3.2.1.6.1.1.7.1");
# serial
# $details->serial = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.367.3.2.1.2.1.4.0");
# hostname
# $details->hostname = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.367.3.2.1.6.1.1.7.1");
return $details;
};
示例13: function
# along with Open-AudIT (most likely in a file named LICENSE).
# If not, see <http://www.gnu.org/licenses/>
#
# For further information on Open-AudIT or for a license other than AGPL please see
# www.opmantek.com or email contact@opmantek.com
#
# *****************************************************************************
/*
* @package Open-AudIT
* @author Mark Unwin <marku@opmantek.com>
*
* @version 1.12.8
* @copyright Copyright (c) 2014, Opmantek
* @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3
*/
# Vendor VMware
$get_oid_details = function ($ip, $credentials, $oid) {
$details = new stdClass();
$model = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.6876.1.1.0");
$version = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.6876.1.2.0");
$details->model = $model . " (" . $version . ")";
$details->model = str_replace("\"", "", $details->model);
$details->os_group = "VMware";
$details->os_family = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.6876.1.1.0");
$details->os_family = str_replace("\"", "", $details->os_family);
$details->os_name = my_snmp_get($ip, $credentials, "1.3.6.1.2.1.1.1.0");
$details->os_name = str_replace("\"", "", $details->os_name);
$details->type = 'computer';
$details->class = 'hypervisor';
return $details;
};
示例14: function
# Open-AudIT is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with Open-AudIT (most likely in a file named LICENSE).
# If not, see <http://www.gnu.org/licenses/>
#
# For further information on Open-AudIT or for a license other than AGPL please see
# www.opmantek.com or email contact@opmantek.com
#
# *****************************************************************************
/*
* @package Open-AudIT
* @author Mark Unwin <marku@opmantek.com>
*
* @version 1.12.8
* @copyright Copyright (c) 2014, Opmantek
* @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3
*/
# Vendor Isilon
$get_oid_details = function ($ip, $credentials, $oid) {
$details = new stdClass();
if ($oid == '1.3.6.1.4.1.12124.1') {
$details->type = 'storage misc';
}
$details->serial = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.12124.2.51.1.3.1");
$details->model = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.12124.2.51.1.4.1");
return $details;
};
示例15: function
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with Open-AudIT (most likely in a file named LICENSE).
# If not, see <http://www.gnu.org/licenses/>
#
# For further information on Open-AudIT or for a license other than AGPL please see
# www.opmantek.com or email contact@opmantek.com
#
# *****************************************************************************
/*
* @package Open-AudIT
* @author Mark Unwin <marku@opmantek.com>
*
* @version 1.12.8
* @copyright Copyright (c) 2014, Opmantek
* @license http://www.gnu.org/licenses/agpl-3.0.html aGPL v3
*/
# Buffalo
$get_oid_details = function ($ip, $credentials, $oid) {
$details = new stdClass();
if ($oid == '1.3.6.1.4.1.5951.1') {
$details->model = 'Load Balancer';
$details->type = 'load balancer';
}
$details->model = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.5951.4.1.1.11.0");
$details->serial = my_snmp_get($ip, $credentials, "1.3.6.1.4.1.5951.4.1.1.14.0");
return $details;
};