mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fixing ipv6
git-svn-id: http://www.observium.org/svn/observer/trunk@273 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
<?php
|
||||
|
||||
echo("IPv6 Addresses : ");
|
||||
echo("IPv6 Addresses : ");
|
||||
|
||||
$oids = trim(shell_exec($config['snmpwalk']." -".$device['snmpver']." -c ".$device['community']." ".$device['hostname']." ipAddressIfIndex.ipv6 -Osq"));
|
||||
$ipv6interfaces = shell_exec($config['snmpget']." -Ovnq -".$device['snmpver']." -c ".$device['community']." ".$device['hostname']." ipv6Interfaces.0");
|
||||
|
||||
if($ipv6interfaces){
|
||||
|
||||
$oids = trim(shell_exec($config['snmpwalk']." -".$device['snmpver']." -Ln -c ".$device['community']." ".$device['hostname']." ipAddressIfIndex.ipv6 -Osq | grep -v No"));
|
||||
$oids = str_replace("ipAddressIfIndex.ipv6.", "", $oids); $oids = str_replace("\"", "", $oids); $oids = trim($oids);
|
||||
foreach(explode("\n", $oids) as $data) {
|
||||
$data = trim($data);
|
||||
@@ -44,5 +48,7 @@
|
||||
}
|
||||
} else { echo("."); }
|
||||
}
|
||||
} else { echo("None configured"); }
|
||||
|
||||
?>
|
||||
|
||||
|
Reference in New Issue
Block a user