mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix globals in discovery modules
git-svn-id: http://www.observium.org/svn/observer/trunk@2234 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
echo("Discovery protocols:");
|
||||
|
||||
global $link_exists;
|
||||
|
||||
$community = $device['community'];
|
||||
|
||||
if ($device['os'] == "ironware")
|
||||
|
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
echo("Frequencies: ");
|
||||
|
||||
include_dir("includes/discovery/frequencies");
|
||||
@@ -9,4 +10,4 @@ check_valid_sensors($device, 'frequency', $valid_sensor);
|
||||
|
||||
echo("\n");
|
||||
|
||||
?>
|
||||
?>
|
||||
|
@@ -2,6 +2,8 @@
|
||||
|
||||
echo("IPv6 Addresses : ");
|
||||
|
||||
global $valid_v6;
|
||||
|
||||
$oids = snmp_walk($device, "ipAddressIfIndex.ipv6", "-Ln -Osq", "IP-MIB");
|
||||
$oids = str_replace("ipAddressIfIndex.ipv6.", "", $oids);
|
||||
$oids = str_replace("\"", "", $oids);
|
||||
@@ -81,4 +83,4 @@ unset($valid_v6);
|
||||
|
||||
echo("\n");
|
||||
|
||||
?>
|
||||
?>
|
||||
|
@@ -2,6 +2,8 @@
|
||||
|
||||
echo("Memory : ");
|
||||
|
||||
global $valid_mempool; ## FIXME PLEASE!
|
||||
|
||||
include_dir("includes/discovery/mempools");
|
||||
|
||||
### Remove memory pools which weren't redetected here
|
||||
@@ -29,4 +31,4 @@ while ($test_mempool = mysql_fetch_assoc($query))
|
||||
unset($valid_mempool);
|
||||
echo("\n");
|
||||
|
||||
?>
|
||||
?>
|
||||
|
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
echo("Power: ");
|
||||
|
||||
include_dir("includes/discovery/power");
|
||||
@@ -9,4 +10,4 @@ check_valid_sensors($device, 'power', $valid_sensor);
|
||||
|
||||
echo("\n");
|
||||
|
||||
?>
|
||||
?>
|
||||
|
@@ -2,6 +2,8 @@
|
||||
|
||||
echo("Processors : ");
|
||||
|
||||
global $valid_processor;
|
||||
|
||||
include_dir("includes/discovery/processors");
|
||||
|
||||
## Last-resort discovery here
|
||||
@@ -31,4 +33,4 @@ while ($test_processor = mysql_fetch_assoc($query))
|
||||
unset($valid_processor);
|
||||
echo("\n");
|
||||
|
||||
?>
|
||||
?>
|
||||
|
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
global $valid_sensor;
|
||||
|
||||
$valid_sensor = array();
|
||||
|
||||
echo("Sensors: ");
|
||||
|
@@ -2,6 +2,8 @@
|
||||
|
||||
echo("Storage : ");
|
||||
|
||||
global $valid_storage;
|
||||
|
||||
include_dir("includes/discovery/storage");
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user