mirror of
				https://github.com/librenms/librenms.git
				synced 2024-10-07 16:52:45 +00:00 
			
		
		
		
	* newdevice: Add support for Array Networks ArrayOS #5257 * preg_replace -> str_replace
This commit is contained in:
		
				
					committed by
					
						
						Tony Murray
					
				
			
			
				
	
			
			
			
						parent
						
							4d5d612704
						
					
				
				
					commit
					14a2d290ae
				
			
							
								
								
									
										
											BIN
										
									
								
								html/images/logos/arraynetworks.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								html/images/logos/arraynetworks.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 6.7 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								html/images/os/arraynetworks.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								html/images/os/arraynetworks.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 1.7 KiB  | 
							
								
								
									
										9
									
								
								includes/definitions/arrayos.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								includes/definitions/arrayos.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
				
			|||||||
 | 
					os: arrayos
 | 
				
			||||||
 | 
					text: Array Networks
 | 
				
			||||||
 | 
					type: loadbalancer
 | 
				
			||||||
 | 
					icon: arraynetworks
 | 
				
			||||||
 | 
					discovery:
 | 
				
			||||||
 | 
					    - sysObjectId:
 | 
				
			||||||
 | 
					        - .1.3.6.1.4.1.7564
 | 
				
			||||||
 | 
					mib_dir:
 | 
				
			||||||
 | 
					    - arraynetworks
 | 
				
			||||||
							
								
								
									
										31
									
								
								includes/polling/os/arrayos.inc.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								includes/polling/os/arrayos.inc.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,31 @@
 | 
				
			|||||||
 | 
					<?php
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * arrayos.inc.php
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * LibreNMS os polling module for Array OS
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * 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.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * This program is distributed in the hope that it will be useful,
 | 
				
			||||||
 | 
					 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
				
			||||||
 | 
					 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
 | 
				
			||||||
 | 
					 * GNU General Public License for more details.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * You should have received a copy of the GNU General Public License
 | 
				
			||||||
 | 
					 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @package    LibreNMS
 | 
				
			||||||
 | 
					 * @link       http://librenms.org
 | 
				
			||||||
 | 
					 * @copyright  2016 Neil Lathwood
 | 
				
			||||||
 | 
					 * @author     Neil Lathwood <neil@lathwood.co.uk>
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					list($hardware, $version) = explode(' - ', $poll_device['sysDescr']);
 | 
				
			||||||
 | 
					$hardware = str_replace('Hardware:', '', $hardware);
 | 
				
			||||||
 | 
					preg_match('/\.([0-9\.]+) /', $version, $matches);
 | 
				
			||||||
 | 
					$version = $matches[1];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					$serial = snmp_get($device, 'serialNumber.0', '-Oqv', 'CA-SNMP-MIB8');
 | 
				
			||||||
							
								
								
									
										3040
									
								
								mibs/arraynetworks/CA-SNMP-MIB8
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3040
									
								
								mibs/arraynetworks/CA-SNMP-MIB8
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -168,6 +168,11 @@ class DiscoveryTest extends \PHPUnit_Framework_TestCase
 | 
				
			|||||||
        $this->checkOS('arista_eos');
 | 
					        $this->checkOS('arista_eos');
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public function testArrayOS()
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        $this->checkOS('arrayos');
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public function testArubaos()
 | 
					    public function testArubaos()
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        $this->checkOS('arubaos');
 | 
					        $this->checkOS('arubaos');
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										2
									
								
								tests/snmpsim/arrayos.snmprec
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								tests/snmpsim/arrayos.snmprec
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,2 @@
 | 
				
			|||||||
 | 
					1.3.6.1.2.1.1.1.0|4|Hardware: Array APV 2600 Intel(R) Pentium(R) CPU - Software: ArrayOS Rel.APV.8.5.0.92 build on Tue Jun 28 16:20:47 2016
 | 
				
			||||||
 | 
					1.3.6.1.2.1.1.2.0|6|.1.3.6.1.4.1.7564
 | 
				
			||||||
		Reference in New Issue
	
	Block a user