| 
									
										
										
										
											2015-06-24 14:23:54 -07:00
										 |  |  | <?php | 
					
						
							|  |  |  | /* | 
					
						
							| 
									
										
										
										
											2015-07-13 20:10:26 +02:00
										 |  |  |  * LibreNMS WebPower OS information module | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * Copyright (c) 2015 Mike Rostermund <mike@kollegienet.dk> | 
					
						
							|  |  |  |  * This program is free software: you can redistribute it and/or modify it | 
					
						
							|  |  |  |  * under the terms of the GNU General Public License as published by the | 
					
						
							|  |  |  |  * Free Software Foundation, either version 3 of the License, or (at your | 
					
						
							|  |  |  |  * option) any later version.  Please see LICENSE.txt at the top level of | 
					
						
							|  |  |  |  * the source code distribution for details. | 
					
						
							|  |  |  |  */ | 
					
						
							| 
									
										
										
										
											2015-06-24 14:23:54 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-13 20:10:26 +02:00
										 |  |  | $data = str_replace('"', '', snmp_get($device, '1.3.6.1.2.1.33.1.1.4.0', '-Ovq')); | 
					
						
							| 
									
										
										
										
											2015-06-24 14:23:54 -07:00
										 |  |  | preg_match_all('/^WebPower Pro II Card|v[0-9]+.[0-9]+|(SN [0-9]+)/', $data, $matches); | 
					
						
							|  |  |  | $hardware = $matches[0][0]; | 
					
						
							| 
									
										
										
										
											2015-07-13 20:10:26 +02:00
										 |  |  | $version  = $matches[0][1]; | 
					
						
							|  |  |  | $serial   = $matches[0][2]; |