mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02: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");
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
echo("Memory : ");
|
||||
|
||||
global $valid_mempool; ## FIXME PLEASE!
|
||||
|
||||
include_dir("includes/discovery/mempools");
|
||||
|
||||
### Remove memory pools which weren't redetected here
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
echo("Power: ");
|
||||
|
||||
include_dir("includes/discovery/power");
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
echo("Processors : ");
|
||||
|
||||
global $valid_processor;
|
||||
|
||||
include_dir("includes/discovery/processors");
|
||||
|
||||
## Last-resort discovery here
|
||||
|
||||
@@ -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