mirror of
				https://github.com/librenms/librenms.git
				synced 2024-10-07 16:52:45 +00:00 
			
		
		
		
	* Added detection for Hirschmann Railswitch * Update AUTHORS.md I agree to the conditions of the Contributor Agreement contained in doc/General/Contributing.md. * Fixes for PR 6207 requested changes * Fixes for PR 6207 requested changes * Fixes for PR 6207 requested changes * Fix for PR 6207 requested changes * Fix for PR 6207 requested changes * Fix for PR 6207 requested changes (old states and temperatures directories removal) * fix for PR 6207 : state fileupdated
		
			
				
	
	
		
			11 lines
		
	
	
		
			424 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			11 lines
		
	
	
		
			424 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
if ($device['os'] == 'hirschmann') {
 | 
						|
    $mem_allocated = snmp_get($device, 'HMPRIV-MGMT-SNMP-MIB::hmMemoryAllocated.0', '-OvQ');
 | 
						|
    $mem_free = snmp_get($device, 'HMPRIV-MGMT-SNMP-MIB::hmMemoryFree.0', '-OvQ');
 | 
						|
    $usage = $mem_allocated / ($mem_allocated + $mem_free);
 | 
						|
 | 
						|
    if (is_numeric($usage)) {
 | 
						|
        discover_mempool($valid_mempool, $device, 0, 'hirschmann-mem', 'Main Memory', '100', null, null);
 | 
						|
    }
 | 
						|
}
 |