| 
									
										
										
										
											2011-03-23 11:47:37 +00:00
										 |  |  | <?php | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-13 20:10:26 +02:00
										 |  |  | // Hardcoded discovery of device CPU usage on Alcatel-Lucent Omniswitches.
 | 
					
						
							|  |  |  | if ($device['os'] == 'aos') { | 
					
						
							|  |  |  |     echo 'Alcatel-Lucent Device : '; | 
					
						
							| 
									
										
										
										
											2011-03-23 11:47:37 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-13 20:10:26 +02:00
										 |  |  |     $descr = 'Device CPU'; | 
					
						
							| 
									
										
										
										
											2016-09-28 08:19:28 -05:00
										 |  |  |     $usage = snmp_get($device, '1.3.6.1.4.1.6486.800.1.2.1.16.1.1.1.13.0', '-OQUvs', 'ALCATEL-IND1-HEALTH-MIB', 'aos'); | 
					
						
							| 
									
										
										
										
											2011-03-23 11:47:37 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-13 20:10:26 +02:00
										 |  |  |     if (is_numeric($usage)) { | 
					
						
							|  |  |  |         discover_processor($valid['processor'], $device, '1.3.6.1.4.1.6486.800.1.2.1.16.1.1.1.13.0', '0', 'aos-system', $descr, '1', $usage, null, null); | 
					
						
							| 
									
										
										
										
											2016-08-28 12:32:58 -05:00
										 |  |  |     } else { | 
					
						
							| 
									
										
										
										
											2015-07-13 20:10:26 +02:00
										 |  |  |         // AOS7 devices use a different OID for CPU load. Not all Switches have
 | 
					
						
							|  |  |  |         // healthModuleCpuLatest so we use healthModuleCpu1MinAvg which makes no
 | 
					
						
							|  |  |  |         // difference for a 5 min. polling interval.
 | 
					
						
							|  |  |  |         // Note: This OID shows (a) the CPU load of a single switch or (b) the
 | 
					
						
							|  |  |  |         // average CPU load of all CPUs in a stack of switches.
 | 
					
						
							|  |  |  |         $usage = snmp_get($device, '1.3.6.1.4.1.6486.801.1.2.1.16.1.1.1.1.1.11.0', '-OQUvs', null, null); | 
					
						
							|  |  |  |         if (is_numeric($usage)) { | 
					
						
							|  |  |  |             discover_processor($valid['processor'], $device, '1.3.6.1.4.1.6486.801.1.2.1.16.1.1.1.1.1.11.0', '0', 'aos-system', $descr, '1', $usage, null, null); | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | }//end if
 |