mirror of
				https://github.com/librenms/librenms.git
				synced 2024-10-07 16:52:45 +00:00 
			
		
		
		
	git-svn-id: http://www.observium.org/svn/observer/trunk@2643 61d68cd4-352d-0410-923a-c4978735b2b8
		
			
				
	
	
		
			28 lines
		
	
	
		
			1020 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			1020 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
# FIXME: EMD "stack" support
 | 
						|
# FIXME: What to do with IPOMANII-MIB::ipmEnvEmdConfigHumiOffset.0 ?
 | 
						|
 | 
						|
if ($device['os'] == "ipoman")
 | 
						|
{
 | 
						|
  echo(" IPOMANII-MIB ");
 | 
						|
  $emd_installed = snmp_get($device, "IPOMANII-MIB::ipmEnvEmdStatusEmdType.0"," -Oqv");
 | 
						|
 | 
						|
  if ($emd_installed == 'eMD-HT')
 | 
						|
  {
 | 
						|
    $descr      = snmp_get($device, "IPOMANII-MIB::ipmEnvEmdConfigHumiName.0", "-Oqv");
 | 
						|
    $current    = snmp_get($device, "IPOMANII-MIB::ipmEnvEmdStatusHumidity.0", "-Oqv") / 10;
 | 
						|
    $high_limit = snmp_get($device, "IPOMANII-MIB::ipmEnvEmdConfigHumiHighSetPoint.0", "-Oqv");
 | 
						|
    $low_limit  = snmp_get($device, "IPOMANII-MIB::ipmEnvEmdConfigHumiLowSetPoint.0", "-Oqv");
 | 
						|
 | 
						|
    if ($descr != "" && is_numeric($current) && $current > "0")
 | 
						|
    {
 | 
						|
      $current_oid = ".1.3.6.1.4.1.2468.1.4.2.1.5.1.1.3.0";
 | 
						|
      $descr = trim(str_replace("\"", "", $descr));
 | 
						|
 | 
						|
      discover_sensor($valid['sensor'], 'humidity', $device, $current_oid, "1", 'ipoman', $descr, '10', '1', $low_limit, NULL, NULL, $high_limit, $current);
 | 
						|
    }
 | 
						|
  }
 | 
						|
}
 | 
						|
 | 
						|
?>
 |