mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
add cpu detection for netscaler
git-svn-id: http://www.observium.org/svn/observer/trunk@2832 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 726 B |
@@ -171,7 +171,7 @@ if (device_permitted($vars['device']) || $check_device == $vars['device'])
|
||||
{
|
||||
echo('<li class="' . $select['loadbalancer'] . '">
|
||||
<a href="'.generate_device_url($device, array('tab' => 'loadbalancer')).'">
|
||||
<img src="images/16/arrow_divide.png" align="absmiddle" border="0" /> Load Balancer
|
||||
<img src="images/icons/loadbalancer.png" align="absmiddle" border="0" /> Load Balancer
|
||||
</a>
|
||||
</li>');
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
#root@alpha:/home/observium/dev# snmpwalk -v2c -c ### -M mibs -m +NS-ROOT-MIB netscaler.test nsCPUTable
|
||||
#NS-ROOT-MIB::nsCPUname."cpu0" = STRING: "cpu0"
|
||||
#NS-ROOT-MIB::nsCPUusage."cpu0" = Gauge32: 0
|
||||
|
||||
|
||||
if($device['os'] == "netscaler")
|
||||
{
|
||||
echo(" NetScaler ");
|
||||
|
||||
echo(" Caching OIDs:");
|
||||
|
||||
if (!is_array($nsaarray))
|
||||
{
|
||||
$nsarray = array();
|
||||
echo(" nsCPUTable ");
|
||||
$nsarray = snmpwalk_cache_multi_oid($device, "nsCPUTable", $nsarray, "NS-ROOT-MIB");
|
||||
}
|
||||
|
||||
foreach($nsarray as $descr => $data)
|
||||
{
|
||||
|
||||
$current = $data['nsCPUusage'];
|
||||
|
||||
$oid = ".1.3.6.1.4.1.5951.4.1.1.41.6.1.2." . string_to_oid($descr);
|
||||
$descr = $data['nsCPUname'];
|
||||
|
||||
discover_processor($valid['processor'], $device, $oid, $descr, "netscaler", $descr, "1", $current, NULL, NULL);
|
||||
|
||||
}
|
||||
|
||||
unset($nsarray, $oid, $descr, $current);
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user