mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
syntaxer run
git-svn-id: http://www.observium.org/svn/observer/trunk@3008 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -182,6 +182,7 @@ $config['enable_inventory'] = 1; # Enable Inventory
|
||||
$config['enable_pseudowires'] = 1; # Enable Pseudowires
|
||||
$config['enable_vrfs'] = 1; # Enable VRFs
|
||||
$config['enable_printers'] = 0; # Enable Printer support
|
||||
$config['enable_sla'] = 0; # Enable Cisco SLA collection and display
|
||||
|
||||
### Ports extension modules
|
||||
|
||||
|
@@ -7,7 +7,8 @@ if ($config['enable_sla'] && $device['os_group'] == "cisco")
|
||||
$slas = snmp_walk($device, "ciscoRttMonMIB.ciscoRttMonObjects.rttMonCtrl", "-Osq", "+CISCO-RTTMON-MIB");
|
||||
|
||||
$sla_table = array();
|
||||
foreach (explode("\n", $slas) as $sla) {
|
||||
foreach (explode("\n", $slas) as $sla)
|
||||
{
|
||||
$key_val = explode(" ", $sla, 2);
|
||||
if (count($key_val) != 2)
|
||||
$key_val[] = "";
|
||||
@@ -78,7 +79,7 @@ if ($config['enable_sla'] && $device['os_group'] == "cisco")
|
||||
}
|
||||
}
|
||||
|
||||
if( !$sla_id )
|
||||
if (!$sla_id)
|
||||
{
|
||||
$sla_id = dbInsert($data, 'slas');
|
||||
echo "+";
|
||||
|
@@ -60,5 +60,4 @@ if (is_numeric($cpu_usage))
|
||||
#$mem=snmp_get($device, "FORTINET-FORTIGATE-MIB::fgSysMemUsage.0", "-Ovq");
|
||||
#$memsize=snmp_get($device, "FORTINET-FORTIGATE-MIB::fgSysMemCapacity", "-Ovq");
|
||||
|
||||
|
||||
?>
|
||||
|
@@ -446,7 +446,7 @@ foreach ($ports as $port)
|
||||
elseif ($port['disabled'] != "1")
|
||||
{
|
||||
echo("Port Deleted"); ### Port missing from SNMP cache.
|
||||
if($port['deleted'] != "1")
|
||||
if ($port['deleted'] != "1")
|
||||
{
|
||||
dbUpdate(array('deleted' => '1'), 'ports', '`device_id` = ? AND `ifIndex` = ?', array($device['device_id'], $port['ifIndex']));
|
||||
}
|
||||
|
@@ -14,7 +14,7 @@ function snmp_get_multi($device, $oids, $options = "-OQUs", $mib = NULL, $mibdir
|
||||
{
|
||||
global $debug,$config,$runtime_stats,$mibs_loaded;
|
||||
|
||||
if(!$options) { $options = "-OQUs"; }
|
||||
if (!$options) { $options = "-OQUs"; }
|
||||
|
||||
if (is_numeric($device['timeout']) && $device['timeout'] > 0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user