From 6b8550c551c89a4ef65b20df4f4bf28742738c7f Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Tue, 29 Mar 2011 13:48:03 +0000 Subject: [PATCH] Basic QNAP Turbo NAS support. (versions and hardware). git-svn-id: http://www.observium.org/svn/observer/trunk@1989 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/images/os/qnap.png | Bin 0 -> 710 bytes includes/discovery/os/linux.inc.php | 15 ++++++- includes/polling/os/unix.inc.php | 58 ++++++++++++++++------------ includes/static-config.php | 10 +++++ 4 files changed, 58 insertions(+), 25 deletions(-) create mode 100644 html/images/os/qnap.png diff --git a/html/images/os/qnap.png b/html/images/os/qnap.png new file mode 100644 index 0000000000000000000000000000000000000000..bf79161575b880a2c0120768f86569883498268c GIT binary patch literal 710 zcmV;%0y+JOP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02y>eSaefwW^{L9 za%BKeVQFr3E>1;MAa*k@H7+-&gq_R)00K5iL_t(oM`K_Z1*0K=B?N3E=5Q%F^=a@L zG#hd2HIapR^_z`UUHUal1E+Bi705cClQ>08+lu&&TFwDA{{>q7pBk7)zv;JtQOjvz z)3zLapUG@k9RsvjlFy*|GBqs3X9mAv%NZrdUQrB32pY8!^1FkjKN9Qen_ zr}dA8<-|W`=8ykaS-1b=;wmmPh))nQZk-3LVLxFjkjN>Bs<`wUm~r6_RbTc$oLu$) z7#V;4V_^6Xr2hjQb^3*XM7h36O*zmZcaa@};s9Vnp`M7kfMDZ<&#>jj3`N%*U`RXx zI|7E8Sw4K@;cwG5uC4^Ou-<{}0y>}oo(O>)KWaDtWCpNe`|e~=SPqPeqbQC5IfjYp z$!T%TEMR+Jhon`91Ka_?W)dgR_0Os02#`67CXJK+aB!~2a0JjHf7m%@TyzRTZ6}JE zcX;sVH~*xjBP2~)7X9Jo!Rm;AOw61A@e8n{w~Wky!E=O%N{vyFXJk#9rU9el2)2;; z$IiYSYZVV{G|B_hMFh|>Wn$*-9l|DUWMK)*jy7OcEIy)Qp#@BsU$HuZhbNwtb_UsM s|MBuN0UdyW|8j9Ll5OayMrwrs03H;|+b_bk@c;k-07*qoM6N<$f{8dV2LJ#7 literal 0 HcmV?d00001 diff --git a/includes/discovery/os/linux.inc.php b/includes/discovery/os/linux.inc.php index ab3f376f5..ac9e0e368 100755 --- a/includes/discovery/os/linux.inc.php +++ b/includes/discovery/os/linux.inc.php @@ -3,6 +3,19 @@ if (!$os) { if (preg_match("/^Linux/", $sysDescr)) { $os = "linux"; } + + + ## Specific Linux-derivatives + + if($os == "linux") { + + ## Check for QNAP Systems TurboNAS + $entPhysicalMfgName = snmp_get($device, "ENTITY-MIB::entPhysicalMfgName.1", "-Osqnv"); + + if(strpos($entPhysicalMfgName, "QNAP") !== FALSE) { $os = "qnap";} + + } + } -?> \ No newline at end of file +?> diff --git a/includes/polling/os/unix.inc.php b/includes/polling/os/unix.inc.php index f4b3178e3..f02d75dc7 100755 --- a/includes/polling/os/unix.inc.php +++ b/includes/polling/os/unix.inc.php @@ -1,6 +1,34 @@ \ No newline at end of file +?> diff --git a/includes/static-config.php b/includes/static-config.php index e81359c88..63ddb132e 100644 --- a/includes/static-config.php +++ b/includes/static-config.php @@ -20,12 +20,22 @@ $config['os'][$os]['text'] = "Vyatta"; $config['os'][$os]['type'] = "network"; $config['os'][$os]['ifname'] = 1; +### Linux-based OSes here please. + $os = "linux"; $config['os'][$os]['type'] = "server"; $config['os'][$os]['group'] = "unix"; $config['os'][$os]['text'] = "Linux"; $config['os'][$os]['ifXmcbc'] = 1; +$os = "qnap"; +$config['os'][$os]['type'] = "server"; +$config['os'][$os]['group'] = "unix"; +$config['os'][$os]['text'] = "QNAP TurboNAS"; +$config['os'][$os]['ifXmcbc'] = 1; + +### Othre Unix-based OSes here please. + $os = "freebsd"; $config['os'][$os]['type'] = "server"; $config['os'][$os]['group'] = "unix";